Class RouteAreaAttribute
Defines the area to set for all the routes defined in this controller.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class RouteAreaAttribute : Attribute
- Inheritance
-
RouteAreaAttribute
- Inherited Members
Constructors
RouteAreaAttribute()
Initializes a new instance of the RouteAreaAttribute class.
public RouteAreaAttribute()
RouteAreaAttribute(string)
Initializes a new instance of the RouteAreaAttribute class.
public RouteAreaAttribute(string areaName)
Parameters
areaNamestringThe name of the area. If the value is null, an attempt will be made to infer the area name from the target controller's namespace.
Properties
AreaName
Gets the area name to set for all the routes defined in the controller. If the value is null, an attempt will be made to infer the area name from the target controller's namespace.
public string AreaName { get; }
Property Value
- string
The area name to set for all the routes defined in the controller.
AreaPrefix
Gets the URL prefix to apply to the routes of this area. Defaults to the area's name.
public string AreaPrefix { get; set; }
Property Value
- string
The URL prefix to apply to the routes of this area.