ODataRouteComponentAttribute Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 |
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()).