Class EndpointRouteBuilderExtensions
- Namespace
- Whipstaff.AspNetCore.Features.ApplicationStartup
- Assembly
- Whipstaff.AspNetCore.dll
Extension methods for IEndpointRouteBuilder.
public static class EndpointRouteBuilderExtensions
- Inheritance
-
EndpointRouteBuilderExtensions
- Inherited Members
Methods
DoCrudMapControllerRoute(IEndpointRouteBuilder, string, string?)
Maps a controller route for the standard CRUD operations.
public static IEndpointRouteBuilder DoCrudMapControllerRoute(this IEndpointRouteBuilder endpointRouteBuilder, string baseRoutePattern, string? namePrefix)
Parameters
endpointRouteBuilder
IEndpointRouteBuilderEndpoint route builder instance to modify.
baseRoutePattern
stringThe base route pattern. Usually along the lines of:
"{controller}" "{controller=Home}" "api/{controller}"
Note: don't use "{controller=Home}/{action=Index}/{id?}" the actions are bound by the HttpMethodRouteConstraint to HTTP verbs.
namePrefix
stringThe name prefix to apply to the route names. Can be left as null if you're only mapping a single set of CRUD routes. Scenarios where you may want more are where you are mapping api's and pages to specific sets of controllers, but in that case you probably want to constrain the controllers which this method DOES NOT support.
Returns
- IEndpointRouteBuilder
The modified endpoint builder.