OData Simplified Uri convention

Applies To:yes OData AspNet WebApi V7yes OData AspNet WebApi V6

OData v4 Web API 5.8 RC introduces a new OData Simplified Uri convention that supports key-as-segment and default OData Uri convention side-by-side.

~/odata/Customers/0
~/odata/Customers(0)

To enable the ODataSimplified Uri convention, in WebApiConfig.cs:

// ...
var model = builder.GetEdmModel();

// Set Uri convention to ODataSimplified
config.SetUrlConventions(ODataUrlConventions.ODataSimplified);
config.MapODataServiceRoute("odata", "odata", model);