Table of Contents

Class RoutePrefixAttribute

Namespace
System.Web.Http
Assembly
System.Web.Http.dll

Annotates a controller with a route prefix that applies to all actions within the controller.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
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.

public RoutePrefixAttribute(string prefix)

Parameters

prefix string

The route prefix for the controller.

Properties

Prefix

Gets the route prefix.

public virtual string Prefix { get; }

Property Value

string