MapRouteRouteBuilderExtensions.MapRoute MapRouteRouteBuilderExtensions.MapRoute MapRouteRouteBuilderExtensions.MapRoute Method

Definition

Overloads

MapRoute(IRouteBuilder, String, String) MapRoute(IRouteBuilder, String, String) MapRoute(IRouteBuilder, String, String)

Adds a route to the IRouteBuilder with the specified name and template.

MapRoute(IRouteBuilder, String, String, Object) MapRoute(IRouteBuilder, String, String, Object) MapRoute(IRouteBuilder, String, String, Object)

Adds a route to the IRouteBuilder with the specified name, template, and default values.

MapRoute(IRouteBuilder, String, String, Object, Object) MapRoute(IRouteBuilder, String, String, Object, Object) MapRoute(IRouteBuilder, String, String, Object, Object)

Adds a route to the IRouteBuilder with the specified name, template, default values, and constraints.

MapRoute(IRouteBuilder, String, String, Object, Object, Object) MapRoute(IRouteBuilder, String, String, Object, Object, Object) MapRoute(IRouteBuilder, String, String, Object, Object, Object)

Adds a route to the IRouteBuilder with the specified name, template, default values, and data tokens.

MapRoute(IRouteBuilder, String, String) MapRoute(IRouteBuilder, String, String) MapRoute(IRouteBuilder, String, String)

Adds a route to the IRouteBuilder with the specified name and template.

public static Microsoft.AspNetCore.Routing.IRouteBuilder MapRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string template);
static member MapRoute : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapRoute (routeBuilder As IRouteBuilder, name As String, template As String) As IRouteBuilder

Parameters

routeBuilder
IRouteBuilder IRouteBuilder IRouteBuilder

The IRouteBuilder to add the route to.

name
String String String

The name of the route.

template
String String String

The URL pattern of the route.

Returns

A reference to this instance after the operation has completed.

MapRoute(IRouteBuilder, String, String, Object) MapRoute(IRouteBuilder, String, String, Object) MapRoute(IRouteBuilder, String, String, Object)

Adds a route to the IRouteBuilder with the specified name, template, and default values.

public static Microsoft.AspNetCore.Routing.IRouteBuilder MapRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string template, object defaults);
static member MapRoute : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * obj -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapRoute (routeBuilder As IRouteBuilder, name As String, template As String, defaults As Object) As IRouteBuilder

Parameters

routeBuilder
IRouteBuilder IRouteBuilder IRouteBuilder

The IRouteBuilder to add the route to.

name
String String String

The name of the route.

template
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.

Returns

A reference to this instance after the operation has completed.

MapRoute(IRouteBuilder, String, String, Object, Object) MapRoute(IRouteBuilder, String, String, Object, Object) MapRoute(IRouteBuilder, String, String, Object, Object)

Adds a route to the IRouteBuilder with the specified name, template, default values, and constraints.

public static Microsoft.AspNetCore.Routing.IRouteBuilder MapRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string template, object defaults, object constraints);
static member MapRoute : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * obj * obj -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapRoute (routeBuilder As IRouteBuilder, name As String, template As String, defaults As Object, constraints As Object) As IRouteBuilder

Parameters

routeBuilder
IRouteBuilder IRouteBuilder IRouteBuilder

The IRouteBuilder to add the route to.

name
String String String

The name of the route.

template
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.

Returns

A reference to this instance after the operation has completed.

MapRoute(IRouteBuilder, String, String, Object, Object, Object) MapRoute(IRouteBuilder, String, String, Object, Object, Object) MapRoute(IRouteBuilder, String, String, Object, Object, Object)

Adds a route to the IRouteBuilder with the specified name, template, default values, and data tokens.

public static Microsoft.AspNetCore.Routing.IRouteBuilder MapRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string template, object defaults, object constraints, object dataTokens);
static member MapRoute : Microsoft.AspNetCore.Routing.IRouteBuilder * string * string * obj * obj * obj -> Microsoft.AspNetCore.Routing.IRouteBuilder
<Extension()>
Public Function MapRoute (routeBuilder As IRouteBuilder, name As String, template As String, defaults As Object, constraints As Object, dataTokens As Object) As IRouteBuilder

Parameters

routeBuilder
IRouteBuilder IRouteBuilder IRouteBuilder

The IRouteBuilder to add the route to.

name
String String String

The name of the route.

template
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

A reference to this instance after the operation has completed.

Applies to