Share via


ODataRouteComponentAttribute Class

Definition

When used to decorate a Controller or Controller method (including ODataController), instructs OData which set of RouteComponents to use.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)]
public class ODataRouteComponentAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)>]
type ODataRouteComponentAttribute = class
    inherit Attribute
Public Class ODataRouteComponentAttribute
Inherits Attribute
Inheritance
ODataRouteComponentAttribute
Attributes

Constructors

ODataRouteComponentAttribute()

Instructs OData to use the default RouteComponents RoutePrefix, which equals Empty, for the decorated Controller or Controller method.

ODataRouteComponentAttribute(String)

Instructs OData to use the specified routePrefix for the decorated Controller or Controller method.

Properties

RoutePrefix

Gets the specified model name.

Applies to