Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ControllerEndpointRouteBuilderExtensions.MapAreaControllerRoute Method

Definition

Namespace:
Microsoft.AspNetCore.Builder
Assembly:
Microsoft.AspNetCore.Mvc.Core.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.App.Ref v3.0.1
Package:
Microsoft.AspNetCore.App.Ref v3.1.10
Package:
Microsoft.AspNetCore.App.Ref v5.0.0
Package:
Microsoft.AspNetCore.App.Ref v6.0.36
Package:
Microsoft.AspNetCore.App.Ref v7.0.5
Package:
Microsoft.AspNetCore.App.Ref v8.0.19
Package:
Microsoft.AspNetCore.App.Ref v9.0.8
Source:
ControllerEndpointRouteBuilderExtensions.cs

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.

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


Feedback

Was this page helpful?