Class RoutePrefixAttribute
Annotates a controller with a route prefix that applies to all actions within the controller.
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class RoutePrefixAttribute : Attribute, IRoutePrefix
- Inheritance
-
RoutePrefixAttribute
- Implements
- Inherited Members
Constructors
RoutePrefixAttribute()
Initializes a new instance of the RoutePrefixAttribute class.
protected RoutePrefixAttribute()
RoutePrefixAttribute(string)
Initializes a new instance of the RoutePrefixAttribute class with the specified prefix.
public RoutePrefixAttribute(string prefix)
Parameters
prefix
stringThe route prefix for the controller.
Properties
Prefix
Gets the route prefix.
public virtual string Prefix { get; }
Property Value
- string
The route prefix.