AttributeRouteInfo Class

Represents the routing information for an action that is attribute routed.

Namespace
Microsoft.AspNetCore.Mvc.Routing
Assemblies
  • Microsoft.AspNetCore.Mvc.Abstractions

Syntax

public class AttributeRouteInfo
class Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo

Properties

Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo.Name

Gets the name of the route associated with a given action. This property can be used to generate a link by referring to the route by name instead of attempting to match a route by provided route data.

Return type:System.String
public string Name { get; set; }
Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo.Order

Gets the order of the route associated with a given action. This property determines the order in which routes get executed. Routes with a lower order value are tried first. In case a route doesn’t specify a value, it gets a default order of 0.

Return type:System.Int32
public int Order { get; set; }
Microsoft.AspNetCore.Mvc.Routing.AttributeRouteInfo.Template

The route template. May be null if the action has no attribute routes.

Return type:System.String
public string Template { get; set; }