public static void Register(HttpConfiguration config) { // Web API configuration and services // Web API routes config.Routes.MapODataRoute("odata", "odata", GetEdmModel()); //this is were I get the error f config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); } public static IEdmModel GetEdmModel() { ODataModelBuilder builder = new ODataModelBuilder(); builder.EntitySet<Customer>("Customers"); builder.Namespace = "MyBreeseSote.Models"; return builder.GetEdmModel(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)