Share via


MvcAreaRouteBuilderExtensions.MapAreaRoute Method

Definition

Overloads

MapAreaRoute(IRouteBuilder, String, String, String)

Adds a route to the IRouteBuilder with the given MVC area with the specified name, areaName and template.

MapAreaRoute(IRouteBuilder, String, String, String, Object)

Adds a route to the IRouteBuilder with the given MVC area with the specified name, areaName, template, and defaults.

MapAreaRoute(IRouteBuilder, String, String, String, Object, Object)

Adds a route to the IRouteBuilder with the given MVC area with the specified name, areaName, template, defaults, and constraints.

MapAreaRoute(IRouteBuilder, String, String, String, Object, Object, Object)

Adds a route to the IRouteBuilder with the given MVC area with the specified name, areaName, template, defaults, constraints, and dataTokens.

MapAreaRoute(IRouteBuilder, String, String, String)

Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs

Adds a route to the IRouteBuilder with the given MVC area with the specified name, areaName and template.

public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string? template);

Parameters

routeBuilder
IRouteBuilder

The IRouteBuilder to add the route to.

name
String

The name of the route.

areaName
String

The MVC area name.

template
String

The URL pattern of the route.

Returns

A reference to this instance after the operation has completed.

Applies to

MapAreaRoute(IRouteBuilder, String, String, String, Object)

Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs

Adds a route to the IRouteBuilder with the given MVC area with the specified name, areaName, template, and defaults.

public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string? template, object? defaults);

Parameters

routeBuilder
IRouteBuilder

The IRouteBuilder to add the route to.

name
String

The name of the route.

areaName
String

The MVC area name.

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

Returns

A reference to this instance after the operation has completed.

Applies to

MapAreaRoute(IRouteBuilder, String, String, String, Object, Object)

Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs

Adds a route to the IRouteBuilder with the given MVC area with the specified name, areaName, template, defaults, and constraints.

public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults, object constraints);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string? template, object? defaults, object? constraints);

Parameters

routeBuilder
IRouteBuilder

The IRouteBuilder to add the route to.

name
String

The name of the route.

areaName
String

The MVC area name.

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

Returns

A reference to this instance after the operation has completed.

Applies to

MapAreaRoute(IRouteBuilder, String, String, String, Object, Object, Object)

Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs
Source:
MvcAreaRouteBuilderExtensions.cs

Adds a route to the IRouteBuilder with the given MVC area with the specified name, areaName, template, defaults, constraints, and dataTokens.

public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string template, object defaults, object constraints, object dataTokens);
public static Microsoft.AspNetCore.Routing.IRouteBuilder MapAreaRoute (this Microsoft.AspNetCore.Routing.IRouteBuilder routeBuilder, string name, string areaName, string? template, object? defaults, object? constraints, object? dataTokens);

Parameters

routeBuilder
IRouteBuilder

The IRouteBuilder to add the route to.

name
String

The name of the route.

areaName
String

The MVC area name.

template
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

A reference to this instance after the operation has completed.

Applies to