EndpointRouteBuilderExtensions.MapGroup Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MapGroup(IEndpointRouteBuilder, RoutePattern) |
Creates a RouteGroupBuilder for defining endpoints all prefixed with the specified |
MapGroup(IEndpointRouteBuilder, String) |
Creates a RouteGroupBuilder for defining endpoints all prefixed with the specified |
MapGroup(IEndpointRouteBuilder, RoutePattern)
Creates a RouteGroupBuilder for defining endpoints all prefixed with the specified prefix
.
public static Microsoft.AspNetCore.Routing.RouteGroupBuilder MapGroup (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, Microsoft.AspNetCore.Routing.Patterns.RoutePattern prefix);
static member MapGroup : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * Microsoft.AspNetCore.Routing.Patterns.RoutePattern -> Microsoft.AspNetCore.Routing.RouteGroupBuilder
<Extension()>
Public Function MapGroup (endpoints As IEndpointRouteBuilder, prefix As RoutePattern) As RouteGroupBuilder
Parameters
- endpoints
- IEndpointRouteBuilder
The IEndpointRouteBuilder to add the group to.
- prefix
- RoutePattern
The pattern that prefixes all routes in this group.
Returns
A RouteGroupBuilder that is both an IEndpointRouteBuilder and an IEndpointConventionBuilder.
The same builder can be used to add endpoints with the given prefix
, and to customize those endpoints using conventions.
Applies to
MapGroup(IEndpointRouteBuilder, String)
Creates a RouteGroupBuilder for defining endpoints all prefixed with the specified prefix
.
public static Microsoft.AspNetCore.Routing.RouteGroupBuilder MapGroup (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string prefix);
static member MapGroup : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string -> Microsoft.AspNetCore.Routing.RouteGroupBuilder
<Extension()>
Public Function MapGroup (endpoints As IEndpointRouteBuilder, prefix As String) As RouteGroupBuilder
Parameters
- endpoints
- IEndpointRouteBuilder
The IEndpointRouteBuilder to add the group to.
- prefix
- String
The pattern that prefixes all routes in this group.
Returns
A RouteGroupBuilder that is both an IEndpointRouteBuilder and an IEndpointConventionBuilder.
The same builder can be used to add endpoints with the given prefix
, and to customize those endpoints using conventions.