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 = false)]
public sealed class RoutePrefixAttribute : Attribute
Inheritance
RoutePrefixAttribute
Inherited Members

Constructors

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 string Prefix { get; }

Property Value

string