HttpConfigurationExtensions.MapODataServiceRoute Method
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
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.
public static Microsoft.AspNet.OData.Routing.ODataRoute MapODataServiceRoute (this System.Web.Http.HttpConfiguration configuration, string routeName, string routePrefix, Microsoft.OData.Edm.IEdmModel model, Microsoft.AspNet.OData.Routing.IODataPathHandler pathHandler, System.Collections.Generic.IEnumerable<Microsoft.AspNet.OData.Routing.Conventions.IODataRoutingConvention> routingConventions, Microsoft.AspNet.OData.Batch.ODataBatchHandler batchHandler);
static member MapODataServiceRoute : System.Web.Http.HttpConfiguration * string * string * Microsoft.OData.Edm.IEdmModel * Microsoft.AspNet.OData.Routing.IODataPathHandler * seq<Microsoft.AspNet.OData.Routing.Conventions.IODataRoutingConvention> * Microsoft.AspNet.OData.Batch.ODataBatchHandler -> Microsoft.AspNet.OData.Routing.ODataRoute
<Extension()>
Public 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
- System.Web.Http.HttpConfiguration
The server configuration.
- routeName
- String
The name of the route to map.
- routePrefix
- String
The prefix to add to the OData route's path template.
- model
- IEdmModel
The EDM model to use for parsing OData paths.
- pathHandler
- IODataPathHandler
The IODataPathHandler to use for parsing the OData path.
- routingConventions
- IEnumerable<IODataRoutingConvention>
The OData routing conventions to use for controller and action selection.
- batchHandler
- ODataBatchHandler
The ODataBatchHandler.
Returns
The added ODataRoute.
Applies to
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.
public static Microsoft.AspNet.OData.Routing.ODataRoute MapODataServiceRoute (this System.Web.Http.HttpConfiguration configuration, string routeName, string routePrefix, Microsoft.OData.Edm.IEdmModel model, Microsoft.AspNet.OData.Routing.IODataPathHandler pathHandler, System.Collections.Generic.IEnumerable<Microsoft.AspNet.OData.Routing.Conventions.IODataRoutingConvention> routingConventions, System.Net.Http.HttpMessageHandler defaultHandler);
static member MapODataServiceRoute : System.Web.Http.HttpConfiguration * string * string * Microsoft.OData.Edm.IEdmModel * Microsoft.AspNet.OData.Routing.IODataPathHandler * seq<Microsoft.AspNet.OData.Routing.Conventions.IODataRoutingConvention> * System.Net.Http.HttpMessageHandler -> Microsoft.AspNet.OData.Routing.ODataRoute
<Extension()>
Public 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
- System.Web.Http.HttpConfiguration
The server configuration.
- routeName
- String
The name of the route to map.
- routePrefix
- String
The prefix to add to the OData route's path template.
- model
- IEdmModel
The EDM model to use for parsing OData paths.
- pathHandler
- IODataPathHandler
The IODataPathHandler to use for parsing the OData path.
- routingConventions
- IEnumerable<IODataRoutingConvention>
The OData routing conventions to use for controller and action selection.
- defaultHandler
- HttpMessageHandler
The default HttpMessageHandler for this route.
Returns
The added ODataRoute.
Applies to
MapODataServiceRoute(HttpConfiguration, String, String, IEdmModel, IODataPathHandler, IEnumerable<IODataRoutingConvention>)
Maps the specified OData route.
public static Microsoft.AspNet.OData.Routing.ODataRoute MapODataServiceRoute (this System.Web.Http.HttpConfiguration configuration, string routeName, string routePrefix, Microsoft.OData.Edm.IEdmModel model, Microsoft.AspNet.OData.Routing.IODataPathHandler pathHandler, System.Collections.Generic.IEnumerable<Microsoft.AspNet.OData.Routing.Conventions.IODataRoutingConvention> routingConventions);
static member MapODataServiceRoute : System.Web.Http.HttpConfiguration * string * string * Microsoft.OData.Edm.IEdmModel * Microsoft.AspNet.OData.Routing.IODataPathHandler * seq<Microsoft.AspNet.OData.Routing.Conventions.IODataRoutingConvention> -> Microsoft.AspNet.OData.Routing.ODataRoute
<Extension()>
Public 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
- System.Web.Http.HttpConfiguration
The server configuration.
- routeName
- String
The name of the route to map.
- routePrefix
- String
The prefix to add to the OData route's path template.
- model
- IEdmModel
The EDM model to use for parsing OData paths.
- pathHandler
- IODataPathHandler
The IODataPathHandler to use for parsing the OData path.
- routingConventions
- IEnumerable<IODataRoutingConvention>
The OData routing conventions to use for controller and action selection.
Returns
The added ODataRoute.
Applies to
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.
public static Microsoft.AspNet.OData.Routing.ODataRoute MapODataServiceRoute (this System.Web.Http.HttpConfiguration configuration, string routeName, string routePrefix, Microsoft.OData.Edm.IEdmModel model, System.Net.Http.HttpMessageHandler defaultHandler);
static member MapODataServiceRoute : System.Web.Http.HttpConfiguration * string * string * Microsoft.OData.Edm.IEdmModel * System.Net.Http.HttpMessageHandler -> Microsoft.AspNet.OData.Routing.ODataRoute
<Extension()>
Public Function MapODataServiceRoute (configuration As HttpConfiguration, routeName As String, routePrefix As String, model As IEdmModel, defaultHandler As HttpMessageHandler) As ODataRoute
Parameters
- configuration
- System.Web.Http.HttpConfiguration
The server configuration.
- routeName
- String
The name of the route to map.
- routePrefix
- String
The prefix to add to the OData route's path template.
- model
- IEdmModel
The EDM model to use for parsing OData paths.
- defaultHandler
- HttpMessageHandler
The default HttpMessageHandler for this route.
Returns
The added ODataRoute.
Applies to
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.
public static Microsoft.AspNet.OData.Routing.ODataRoute MapODataServiceRoute (this System.Web.Http.HttpConfiguration configuration, string routeName, string routePrefix, Microsoft.OData.Edm.IEdmModel model, Microsoft.AspNet.OData.Batch.ODataBatchHandler batchHandler);
static member MapODataServiceRoute : System.Web.Http.HttpConfiguration * string * string * Microsoft.OData.Edm.IEdmModel * Microsoft.AspNet.OData.Batch.ODataBatchHandler -> Microsoft.AspNet.OData.Routing.ODataRoute
<Extension()>
Public Function MapODataServiceRoute (configuration As HttpConfiguration, routeName As String, routePrefix As String, model As IEdmModel, batchHandler As ODataBatchHandler) As ODataRoute
Parameters
- configuration
- System.Web.Http.HttpConfiguration
The server configuration.
- routeName
- String
The name of the route to map.
- routePrefix
- String
The prefix to add to the OData route's path template.
- model
- IEdmModel
The EDM model to use for parsing OData paths.
- batchHandler
- ODataBatchHandler
The ODataBatchHandler.
Returns
The added ODataRoute.
Applies to
MapODataServiceRoute(HttpConfiguration, String, String, Action<IContainerBuilder>)
Maps the specified OData route and the OData route attributes.
public static Microsoft.AspNet.OData.Routing.ODataRoute MapODataServiceRoute (this System.Web.Http.HttpConfiguration configuration, string routeName, string routePrefix, Action<Microsoft.OData.IContainerBuilder> configureAction);
static member MapODataServiceRoute : System.Web.Http.HttpConfiguration * string * string * Action<Microsoft.OData.IContainerBuilder> -> Microsoft.AspNet.OData.Routing.ODataRoute
<Extension()>
Public Function MapODataServiceRoute (configuration As HttpConfiguration, routeName As String, routePrefix As String, configureAction As Action(Of IContainerBuilder)) As ODataRoute
Parameters
- configuration
- System.Web.Http.HttpConfiguration
The server configuration.
- routeName
- String
The name of the route to map.
- routePrefix
- String
The prefix to add to the OData route's path template.
- configureAction
- Action<IContainerBuilder>
The configuring action to add the services to the root container.
Returns
The added ODataRoute.
Applies to
MapODataServiceRoute(HttpConfiguration, String, String, IEdmModel)
Maps the specified OData route and the OData route attributes.
public static Microsoft.AspNet.OData.Routing.ODataRoute MapODataServiceRoute (this System.Web.Http.HttpConfiguration configuration, string routeName, string routePrefix, Microsoft.OData.Edm.IEdmModel model);
static member MapODataServiceRoute : System.Web.Http.HttpConfiguration * string * string * Microsoft.OData.Edm.IEdmModel -> Microsoft.AspNet.OData.Routing.ODataRoute
<Extension()>
Public Function MapODataServiceRoute (configuration As HttpConfiguration, routeName As String, routePrefix As String, model As IEdmModel) As ODataRoute
Parameters
- configuration
- System.Web.Http.HttpConfiguration
The server configuration.
- routeName
- String
The name of the route to map.
- routePrefix
- String
The prefix to add to the OData route's path template.
- model
- IEdmModel
The EDM model to use for parsing OData paths.
Returns
The added ODataRoute.