Suoranta.EnterpriseLib.Web - Developer API

EnterpriseLibMvcApp..::..RegisterWebApiConfig Method

Override as necessary

Namespace:  Suoranta.EnterpriseLib.Web
Assembly:  Suoranta.EnterpriseLib.Web (in Suoranta.EnterpriseLib.Web.dll)

Syntax


protected virtual void RegisterWebApiConfig(
	HttpConfiguration config
)

Parameters

config
Type: HttpConfiguration

Examples


C#
config.MapHttpAttributeRoutes();
ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
var entityConfig = builder.EntitySet<TEntity>("EntitySetName");
var route = config.MapODataServiceRoute(
    routeName: "OData",
    routePrefix: "odata",
    model: builder.GetEdmModel()
);