I’m using MVC 4 web api that comes with visual studio 2012.
As I’ve understand odata is not parsed automatically, but we need to add [Queryable] attribute to the action now.
So I added it:
public class TestController : ApiController
{
[Queryable]
public IQueryable<MyClass> GetMyClasses()
{
return ...;
}
}
but I’m getting a compilation error:
The type or namespace name 'Queryable' could not be found (are you missing a using directive or an assembly reference?)
Is the odata still supported? and why Queryable is not recognized as an attribute as listed here.
Thank you
As explained here, OData support has been moved to a separate NuGet package.