ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder, String, String, Object, Object, Object) ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder, String, String, Object, Object, Object) ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder, String, String, Object, Object, Object) Method

Definition

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

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

Parameters

name
String String String

The name of the route.

pattern
String String String

The URL pattern of the route.

defaults
Object Object 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 Object Object

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

dataTokens
Object Object Object

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

Returns

Applies to