-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedValidationThis issue is used to track validation effortsThis issue is used to track validation effortsarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templates
Milestone
Description
Summary
It's super common in the older versions of MVC to subclass Route and implement dynamic generation of route values (usually using a database).
Ex:
- Write a route like
product}/{**slug} - Store the mapping between product slugs and controller/action route values in a database
- Implement an
IRouterthat does a database lookup
The key of this is that the user doesn't really write any significant routing functionality, they just want to map a parameter to a controller/action
Checklist
Example: https://github.com/aspnet/AspNetCore/pull/8955/files#diff-5a433b2664ee6b8ae7b9717bc51d3518
- Can write a
DynamicRouteValueTransformerfor controllers - Can write a
DynamicRouteValueTransformerfor pages - Can still use policies like
[Host]or[Consumes]in conjunction with this feature
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedValidationThis issue is used to track validation effortsThis issue is used to track validation effortsarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templates