Share via


ControllerEndpointRouteBuilderExtensions.MapAreaControllerRoute Method

Definition

Adds endpoints for controller actions to the IEndpointRouteBuilder and specifies a route with the given name, areaName, pattern, defaults, constraints, and dataTokens.

public static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder MapAreaControllerRoute (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string name, string areaName, string pattern, object defaults = default, object constraints = default, object dataTokens = default);
public static Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder MapAreaControllerRoute (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string name, string areaName, string pattern, object? defaults = default, object? constraints = default, object? dataTokens = default);
static member MapAreaControllerRoute : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * string * string * obj * obj * obj -> Microsoft.AspNetCore.Builder.ControllerActionEndpointConventionBuilder
<Extension()>
Public Function MapAreaControllerRoute (endpoints As IEndpointRouteBuilder, name As String, areaName As String, pattern As String, Optional defaults As Object = Nothing, Optional constraints As Object = Nothing, Optional dataTokens As Object = Nothing) As ControllerActionEndpointConventionBuilder

Parameters

endpoints
IEndpointRouteBuilder

The IEndpointRouteBuilder to add the route to.

name
String

The name of the route.

areaName
String

The area name.

pattern
String

The URL pattern of the route.

defaults
Object

An object that contains default values for route parameters. The object's properties represent the names and values of the default values.

constraints
Object

An object that contains constraints for the route. The object's properties represent the names and values of the constraints.

dataTokens
Object

An object that contains data tokens for the route. The object's properties represent the names and values of the data tokens.

Returns

An ControllerActionEndpointConventionBuilder for endpoints associated with controller actions for this route.

Applies to