Table of Contents

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 IEndpointRouteBuilder

Endpoint route builder instance to modify.

baseRoutePattern string

The 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 string

The 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.