Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Created Unassigned: Mvc attribute routing should provide a way to create custom routes and constaints. [1149]

$
0
0
__Scenario__:
User would like to create domain-specific custom routes or add constraints to a route (_note_: not inline constraint) before its added to the route collection.

__Issue__:
Mvc attribute routing extension currently does not provide a way to supply custom RouteBuilder which can be used to perform the above scenario.

__Reason__:
Creating custom routes (domain specific, for example) or custom constraints seem to be a valid scenario, if not common. I think we should provide a way for end users to do this. Currently Web API's extension accepts a HttpRouteBuilder. Also, we need to provide a consistent user experience across MVC and Web API.

The current extensions on MVC attribute routing are:

public static void MapMvcAttributeRoutes(this RouteCollection routes)
public static void MapMvcAttributeRoutes(this RouteCollection routes, IInlineConstraintResolver constraintResolver)
public static void MapMvcAttributeRoutes(this RouteCollection routes, IEnumerable<Type> controllerTypes)
public static void MapMvcAttributeRoutes(this RouteCollection routes, IEnumerable<Type> controllerTypes, IInlineConstraintResolver constraintResolver)

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>