Dela via


EndpointRouteBuilderExtensions.MapGroup Method

Definition

Overloads

MapGroup(IEndpointRouteBuilder, RoutePattern)

Creates a RouteGroupBuilder for defining endpoints all prefixed with the specified prefix.

MapGroup(IEndpointRouteBuilder, String)

Creates a RouteGroupBuilder for defining endpoints all prefixed with the specified prefix.

MapGroup(IEndpointRouteBuilder, RoutePattern)

Source:
EndpointRouteBuilderExtensions.cs

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)

Source:
EndpointRouteBuilderExtensions.cs

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.

Applies to