HttpRouteCollectionExtensions.MapODataServiceRoute Method
Namespace: System.Web.Http.OData.Extensions
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Overload List
Name | Description | |
---|---|---|
MapODataServiceRoute(HttpRouteCollection, String, String, IEdmModel) | Maps the specified OData route. |
|
MapODataServiceRoute(HttpRouteCollection, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>) | Maps the specified OData route. |
|
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. |
|
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
routes
Type: System.Web.Http.HttpRouteCollectionA collection of routes for the application.
routeName
Type: System.StringThe name of the route to map.
routePrefix
Type: System.StringThe prefix to add to the OData route's path template.
model
Type: Microsoft.Data.Edm.IEdmModelThe EDM model to use for parsing OData paths.
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
routes
Type: System.Web.Http.HttpRouteCollectionA collection of routes for the application.
routeName
Type: System.StringThe name of the route to map.
routePrefix
Type: System.StringThe prefix to add to the OData route's path template.
model
Type: Microsoft.Data.Edm.IEdmModelThe EDM model to use for parsing OData paths.
pathHandler
Type: System.Web.Http.OData.Routing.IODataPathHandlerThe IODataPathHandler to use for parsing the OData path.
routingConventions
Type: System.Collections.Generic.IEnumerable<IODataRoutingConvention>The OData routing conventions to use for controller and action selection.
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
routes
Type: System.Web.Http.HttpRouteCollectionA collection of routes for the application.
routeName
Type: System.StringThe name of the route to map.
routePrefix
Type: System.StringThe prefix to add to the OData route's path template.
model
Type: Microsoft.Data.Edm.IEdmModelThe EDM model to use for parsing OData paths.
pathHandler
Type: System.Web.Http.OData.Routing.IODataPathHandlerThe IODataPathHandler to use for parsing the OData path.
routingConventions
Type: System.Collections.Generic.IEnumerable<IODataRoutingConvention>The OData routing conventions to use for controller and action selection.
batchHandler
Type: System.Web.Http.OData.Batch.ODataBatchHandlerThe ODataBatchHandler.
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
routes
Type: System.Web.Http.HttpRouteCollectionA collection of routes for the application.
routeName
Type: System.StringThe name of the route to map.
routePrefix
Type: System.StringThe prefix to add to the OData route's path template.
model
Type: Microsoft.Data.Edm.IEdmModelThe EDM model to use for parsing OData paths.
batchHandler
Type: System.Web.Http.OData.Batch.ODataBatchHandlerThe ODataBatchHandler.
Return Value
Type: System.Web.Http.OData.Routing.ODataRoute
The added ODataRoute.
Return to top