My url is: "/odata/Category?$filter=Number eq 1"
My controller action is this:
[EnableQuery]
public IHttpActionResult Get()
{
var result = categoryService.GetAll();
if (result == null)
return NotFound();
return Ok(result);
}
GetAll() returns an IQueryable<Category> and that is working because it's returning all records from the db.
However, the OData filter is not filtering out the data. What am I missing?
Furthermore, is the filter applied directly against the db or after all records are returned?