HttpConfigurationExtensions.MapODataServiceRoute Method
Namespace: System.Web.OData.Extensions
Assembly: System.Web.OData (in System.Web.OData.dll)
Overload List
Name | Description | |
---|---|---|
![]() ![]() |
MapODataServiceRoute(HttpConfiguration, String, String, IEdmModel) | Maps the specified OData route and the OData route attributes. |
![]() ![]() |
MapODataServiceRoute(HttpConfiguration, String, String, IEdmModel, HttpMessageHandler) | Maps the specified OData route and the OData route attributes. When the defaultHandler is non-null, it will map it as the default handler for the route. |
![]() ![]() |
MapODataServiceRoute(HttpConfiguration, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>) | Maps the specified OData route. |
![]() ![]() |
MapODataServiceRoute(HttpConfiguration, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>, HttpMessageHandler) | Maps the specified OData route. When the defaultHandler is non-null, it will map it as the handler for the route. |
![]() ![]() |
MapODataServiceRoute(HttpConfiguration, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>, ODataBatchHandler) | Maps the specified OData route. When the batchHandler is non-null, it will create a '$batch' endpoint to handle the batch requests. |
![]() ![]() |
MapODataServiceRoute(HttpConfiguration, String, String, IEdmModel, ODataBatchHandler) | Maps the specified OData route and the OData route attributes. When the batchHandler is non-null, it will create a '$batch' endpoint to handle the batch requests. |
See Also
HttpConfigurationExtensions Class
System.Web.OData.Extensions Namespace
Return to top
HttpConfigurationExtensions.MapODataServiceRoute Method (HttpConfiguration, String, String, IEdmModel)
Maps the specified OData route and the OData route attributes.
Syntax
public static ODataRoute MapODataServiceRoute(
this HttpConfiguration configuration,
string routeName,
string routePrefix,
IEdmModel model
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
HttpConfiguration^ configuration,
String^ routeName,
String^ routePrefix,
IEdmModel^ model
)
static member MapODataServiceRoute :
configuration:HttpConfiguration *
routeName:string *
routePrefix:string *
model:IEdmModel -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
configuration As HttpConfiguration,
routeName As String,
routePrefix As String,
model As IEdmModel
) As ODataRoute
Parameters
configuration
Type: System.Web.Http.HttpConfigurationThe server configuration.
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.OData.Edm.IEdmModelThe EDM model to use for parsing OData paths.
Return Value
Type: System.Web.OData.Routing.ODataRoute
The added ODataRoute.
Return to top
HttpConfigurationExtensions.MapODataServiceRoute Method (HttpConfiguration, String, String, IEdmModel, HttpMessageHandler)
Maps the specified OData route and the OData route attributes. When the defaultHandler is non-null, it will map it as the default handler for the route.
Syntax
public static ODataRoute MapODataServiceRoute(
this HttpConfiguration configuration,
string routeName,
string routePrefix,
IEdmModel model,
HttpMessageHandler defaultHandler
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
HttpConfiguration^ configuration,
String^ routeName,
String^ routePrefix,
IEdmModel^ model,
HttpMessageHandler^ defaultHandler
)
static member MapODataServiceRoute :
configuration:HttpConfiguration *
routeName:string *
routePrefix:string *
model:IEdmModel *
defaultHandler:HttpMessageHandler -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
configuration As HttpConfiguration,
routeName As String,
routePrefix As String,
model As IEdmModel,
defaultHandler As HttpMessageHandler
) As ODataRoute
Parameters
configuration
Type: System.Web.Http.HttpConfigurationThe server configuration.
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.OData.Edm.IEdmModelThe EDM model to use for parsing OData paths.
defaultHandler
Type: System.Net.Http.HttpMessageHandlerThe default HttpMessageHandler for this route.
Return Value
Type: System.Web.OData.Routing.ODataRoute
The added ODataRoute.
Return to top
HttpConfigurationExtensions.MapODataServiceRoute Method (HttpConfiguration, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>)
Maps the specified OData route.
Syntax
public static ODataRoute MapODataServiceRoute(
this HttpConfiguration configuration,
string routeName,
string routePrefix,
IEdmModel model,
IODataPathHandler pathHandler,
IEnumerable<IODataRoutingConvention> routingConventions
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
HttpConfiguration^ configuration,
String^ routeName,
String^ routePrefix,
IEdmModel^ model,
IODataPathHandler^ pathHandler,
IEnumerable<IODataRoutingConvention^>^ routingConventions
)
static member MapODataServiceRoute :
configuration:HttpConfiguration *
routeName:string *
routePrefix:string *
model:IEdmModel *
pathHandler:IODataPathHandler *
routingConventions:IEnumerable<IODataRoutingConvention> -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
configuration As HttpConfiguration,
routeName As String,
routePrefix As String,
model As IEdmModel,
pathHandler As IODataPathHandler,
routingConventions As IEnumerable(Of IODataRoutingConvention)
) As ODataRoute
Parameters
configuration
Type: System.Web.Http.HttpConfigurationThe server configuration.
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.OData.Edm.IEdmModelThe EDM model to use for parsing OData paths.
pathHandler
Type: System.Web.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.OData.Routing.ODataRoute
The added ODataRoute.
Return to top
HttpConfigurationExtensions.MapODataServiceRoute Method (HttpConfiguration, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>, HttpMessageHandler)
Maps the specified OData route. When the defaultHandler is non-null, it will map it as the handler for the route.
Syntax
public static ODataRoute MapODataServiceRoute(
this HttpConfiguration configuration,
string routeName,
string routePrefix,
IEdmModel model,
IODataPathHandler pathHandler,
IEnumerable<IODataRoutingConvention> routingConventions,
HttpMessageHandler defaultHandler
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
HttpConfiguration^ configuration,
String^ routeName,
String^ routePrefix,
IEdmModel^ model,
IODataPathHandler^ pathHandler,
IEnumerable<IODataRoutingConvention^>^ routingConventions,
HttpMessageHandler^ defaultHandler
)
static member MapODataServiceRoute :
configuration:HttpConfiguration *
routeName:string *
routePrefix:string *
model:IEdmModel *
pathHandler:IODataPathHandler *
routingConventions:IEnumerable<IODataRoutingConvention> *
defaultHandler:HttpMessageHandler -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
configuration As HttpConfiguration,
routeName As String,
routePrefix As String,
model As IEdmModel,
pathHandler As IODataPathHandler,
routingConventions As IEnumerable(Of IODataRoutingConvention),
defaultHandler As HttpMessageHandler
) As ODataRoute
Parameters
configuration
Type: System.Web.Http.HttpConfigurationThe server configuration.
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.OData.Edm.IEdmModelThe EDM model to use for parsing OData paths.
pathHandler
Type: System.Web.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.
defaultHandler
Type: System.Net.Http.HttpMessageHandlerThe default HttpMessageHandler for this route.
Return Value
Type: System.Web.OData.Routing.ODataRoute
The added ODataRoute.
Return to top
HttpConfigurationExtensions.MapODataServiceRoute Method (HttpConfiguration, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>, ODataBatchHandler)
Maps the specified OData route. When the batchHandler is non-null, it will create a '$batch' endpoint to handle the batch requests.
Syntax
public static ODataRoute MapODataServiceRoute(
this HttpConfiguration configuration,
string routeName,
string routePrefix,
IEdmModel model,
IODataPathHandler pathHandler,
IEnumerable<IODataRoutingConvention> routingConventions,
ODataBatchHandler batchHandler
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
HttpConfiguration^ configuration,
String^ routeName,
String^ routePrefix,
IEdmModel^ model,
IODataPathHandler^ pathHandler,
IEnumerable<IODataRoutingConvention^>^ routingConventions,
ODataBatchHandler^ batchHandler
)
static member MapODataServiceRoute :
configuration:HttpConfiguration *
routeName:string *
routePrefix:string *
model:IEdmModel *
pathHandler:IODataPathHandler *
routingConventions:IEnumerable<IODataRoutingConvention> *
batchHandler:ODataBatchHandler -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
configuration As HttpConfiguration,
routeName As String,
routePrefix As String,
model As IEdmModel,
pathHandler As IODataPathHandler,
routingConventions As IEnumerable(Of IODataRoutingConvention),
batchHandler As ODataBatchHandler
) As ODataRoute
Parameters
configuration
Type: System.Web.Http.HttpConfigurationThe server configuration.
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.OData.Edm.IEdmModelThe EDM model to use for parsing OData paths.
pathHandler
Type: System.Web.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.OData.Batch.ODataBatchHandlerThe ODataBatchHandler.
Return Value
Type: System.Web.OData.Routing.ODataRoute
The added ODataRoute.
Return to top
HttpConfigurationExtensions.MapODataServiceRoute Method (HttpConfiguration, String, String, IEdmModel, ODataBatchHandler)
Maps the specified OData route and the OData route attributes. When the batchHandler is non-null, it will create a '$batch' endpoint to handle the batch requests.
Syntax
public static ODataRoute MapODataServiceRoute(
this HttpConfiguration configuration,
string routeName,
string routePrefix,
IEdmModel model,
ODataBatchHandler batchHandler
)
public:
[ExtensionAttribute]
static ODataRoute^ MapODataServiceRoute(
HttpConfiguration^ configuration,
String^ routeName,
String^ routePrefix,
IEdmModel^ model,
ODataBatchHandler^ batchHandler
)
static member MapODataServiceRoute :
configuration:HttpConfiguration *
routeName:string *
routePrefix:string *
model:IEdmModel *
batchHandler:ODataBatchHandler -> ODataRoute
<ExtensionAttribute>
Public Shared Function MapODataServiceRoute (
configuration As HttpConfiguration,
routeName As String,
routePrefix As String,
model As IEdmModel,
batchHandler As ODataBatchHandler
) As ODataRoute
Parameters
configuration
Type: System.Web.Http.HttpConfigurationThe server configuration.
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.OData.Edm.IEdmModelThe EDM model to use for parsing OData paths.
batchHandler
Type: System.Web.OData.Batch.ODataBatchHandlerThe ODataBatchHandler.
Return Value
Type: System.Web.OData.Routing.ODataRoute
The added ODataRoute.
Return to top