I am trying to configure an OData endpoint for my web API service and I cannot solve the MapODataRoute method. In accordance with this tutorial , the following is indicated about the requirements:
ASP.NET and Web Tools 2012.2 Update or Microsoft Web API ASP.NET OData NuGet.
I have installed the current update of ASP.NET and Web Tools 2012.2 (uninstalled the RC version and installed the newest), so my project should be sufficient.
However, I cannot go through the following line of code:
config.Routes.MapODataRoute("ODataRoute", "odata", model);
... due to the following exception:
'System.Web.Http.HttpRouteCollection' does not contain a definition for "MapODataRoute" and no extension method "MapODataRoute" that takes the first argument of the type "System.Web.Http.HttpRouteCollection" can (do you miss the use directive or assembly reference?)
I believe that if I install the NuGet package, this message would allow (and it does not really matter for installing it) , but I thought that all OData support was minimized to update ASP.NET and Web Tools 2012.2 ' , therefore not NuGet package required? Does anyone know why MapODataRoute does not allow or which link do I need?
source share