-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Get the list of all routes in ASP.NET Core #6330
Comments
Actions in MVC are either attribute routed or conventional routed. You can find the convention routes in the route collection. You can find all of the actions (along with their route data and attribute routes) by injecting the If you can ask more specific questions we can provide more useful information, but the above should be able to get you started. |
@rynowak I just created the following controller:
How can I get the verb (GET, POST, ...) of each route? Thank You |
Look at the |
Based on @mdmoura's comment, I did add something to have a simple display format including the role set on the route when it has Here's the output:
Source: |
I am trying to create a Route Debugger for ASP.NET Core 1. 1 where I need to display a list of all Routes.
So I created the following action inside a controller:
What is the best way to get a list of all routes including controller name, action name and url?
Is there a way to do this in ASP.NET Core 1.1?
The text was updated successfully, but these errors were encountered: