Share via


HttpRouteCollectionExtensions.MapODataServiceRoute Method

 

Namespace:   System.Web.Http.OData.Extensions
Assembly:  System.Web.Http.OData (in System.Web.Http.OData.dll)

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static MapODataServiceRoute(HttpRouteCollection, String, String, IEdmModel)

Maps the specified OData route.

System_CAPS_pubmethodSystem_CAPS_static MapODataServiceRoute(HttpRouteCollection, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>)

Maps the specified OData route.

System_CAPS_pubmethodSystem_CAPS_static MapODataServiceRoute(HttpRouteCollection, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>, ODataBatchHandler)

Maps the specified OData route. When the batchHandler is provided, it will create a '$batch' endpoint to handle the batch requests.

System_CAPS_pubmethodSystem_CAPS_static MapODataServiceRoute(HttpRouteCollection, String, String, IEdmModel, ODataBatchHandler)

Maps the specified OData route. When the batchHandler is provided, it will create a '$batch' endpoint to handle the batch requests.

See Also

HttpRouteCollectionExtensions Class
System.Web.Http.OData.Extensions Namespace

Return to top

HttpRouteCollectionExtensions.MapODataServiceRoute Method (HttpRouteCollection, String, String, IEdmModel)

Maps the specified OData route.

Syntax

public static ODataRoute MapODataServiceRoute(
    this HttpRouteCollection routes,
    string routeName,
    string routePrefix,
    IEdmModel model
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
    HttpRouteCollection^ routes,
    String^ routeName,
    String^ routePrefix,
    IEdmModel^ model
)
static member MapODataServiceRoute : 
        routes:HttpRouteCollection *
        routeName:string *
        routePrefix:string *
        model:IEdmModel -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
    routes As HttpRouteCollection,
    routeName As String,
    routePrefix As String,
    model As IEdmModel
) As ODataRoute

Parameters

  • routePrefix
    Type: System.String

    The prefix to add to the OData route's path template.

Return Value

Type: System.Web.Http.OData.Routing.ODataRoute

The added ODataRoute.

Return to top

HttpRouteCollectionExtensions.MapODataServiceRoute Method (HttpRouteCollection, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>)

Maps the specified OData route.

Syntax

public static ODataRoute MapODataServiceRoute(
    this HttpRouteCollection routes,
    string routeName,
    string routePrefix,
    IEdmModel model,
    IODataPathHandler pathHandler,
    IEnumerable<IODataRoutingConvention> routingConventions
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
    HttpRouteCollection^ routes,
    String^ routeName,
    String^ routePrefix,
    IEdmModel^ model,
    IODataPathHandler^ pathHandler,
    IEnumerable<IODataRoutingConvention^>^ routingConventions
)
static member MapODataServiceRoute : 
        routes:HttpRouteCollection *
        routeName:string *
        routePrefix:string *
        model:IEdmModel *
        pathHandler:IODataPathHandler *
        routingConventions:IEnumerable<IODataRoutingConvention> -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
    routes As HttpRouteCollection,
    routeName As String,
    routePrefix As String,
    model As IEdmModel,
    pathHandler As IODataPathHandler,
    routingConventions As IEnumerable(Of IODataRoutingConvention)
) As ODataRoute

Parameters

  • routePrefix
    Type: System.String

    The prefix to add to the OData route's path template.

Return Value

Type: System.Web.Http.OData.Routing.ODataRoute

The added ODataRoute.

Return to top

HttpRouteCollectionExtensions.MapODataServiceRoute Method (HttpRouteCollection, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>, ODataBatchHandler)

Maps the specified OData route. When the batchHandler is provided, it will create a '$batch' endpoint to handle the batch requests.

Syntax

public static ODataRoute MapODataServiceRoute(
    this HttpRouteCollection routes,
    string routeName,
    string routePrefix,
    IEdmModel model,
    IODataPathHandler pathHandler,
    IEnumerable<IODataRoutingConvention> routingConventions,
    ODataBatchHandler batchHandler
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
    HttpRouteCollection^ routes,
    String^ routeName,
    String^ routePrefix,
    IEdmModel^ model,
    IODataPathHandler^ pathHandler,
    IEnumerable<IODataRoutingConvention^>^ routingConventions,
    ODataBatchHandler^ batchHandler
)
static member MapODataServiceRoute : 
        routes:HttpRouteCollection *
        routeName:string *
        routePrefix:string *
        model:IEdmModel *
        pathHandler:IODataPathHandler *
        routingConventions:IEnumerable<IODataRoutingConvention> *
        batchHandler:ODataBatchHandler -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
    routes As HttpRouteCollection,
    routeName As String,
    routePrefix As String,
    model As IEdmModel,
    pathHandler As IODataPathHandler,
    routingConventions As IEnumerable(Of IODataRoutingConvention),
    batchHandler As ODataBatchHandler
) As ODataRoute

Parameters

  • routePrefix
    Type: System.String

    The prefix to add to the OData route's path template.

Return Value

Type: System.Web.Http.OData.Routing.ODataRoute

The added ODataRoute.

Return to top

HttpRouteCollectionExtensions.MapODataServiceRoute Method (HttpRouteCollection, String, String, IEdmModel, ODataBatchHandler)

Maps the specified OData route. When the batchHandler is provided, it will create a '$batch' endpoint to handle the batch requests.

Syntax

public static ODataRoute MapODataServiceRoute(
    this HttpRouteCollection routes,
    string routeName,
    string routePrefix,
    IEdmModel model,
    ODataBatchHandler batchHandler
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
    HttpRouteCollection^ routes,
    String^ routeName,
    String^ routePrefix,
    IEdmModel^ model,
    ODataBatchHandler^ batchHandler
)
static member MapODataServiceRoute : 
        routes:HttpRouteCollection *
        routeName:string *
        routePrefix:string *
        model:IEdmModel *
        batchHandler:ODataBatchHandler -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
    routes As HttpRouteCollection,
    routeName As String,
    routePrefix As String,
    model As IEdmModel,
    batchHandler As ODataBatchHandler
) As ODataRoute

Parameters

  • routePrefix
    Type: System.String

    The prefix to add to the OData route's path template.

Return Value

Type: System.Web.Http.OData.Routing.ODataRoute

The added ODataRoute.

Return to top