Share via


ODataRouteComponentAttribute Constructors

Definition

Overloads

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.

ODataRouteComponentAttribute()

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

public ODataRouteComponentAttribute ();
Public Sub New ()

Applies to

ODataRouteComponentAttribute(String)

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

public ODataRouteComponentAttribute (string routePrefix);
new Microsoft.AspNetCore.OData.Routing.Attributes.ODataRouteComponentAttribute : string -> Microsoft.AspNetCore.OData.Routing.Attributes.ODataRouteComponentAttribute
Public Sub New (routePrefix As String)

Parameters

routePrefix
String

The key in RouteComponents to use .

Remarks

Ensure this model is registered with OData by calling services.AddOData(options => options.AddRouteComponent()).

Applies to