Did they change the behavior again? A very simple setup is not working:
services.AddOData(opt =>
{
var builder = new ODataConventionModelBuilder();
builder.EntitySet<Tenant>("tenants").EntityType.HasKey(t => t.Id);
opt.AddModel(builder.GetEdmModel())
opt.Count().Filter().Expand().Select().OrderBy().SetMaxTop(25);
});
I can't $filter on any properties, $orderby on any properties, etc. Same message for any property:
The property '<any property>' cannot be used in the <$filter|$orderby> query option.
Also, although I .SetMaxTop(25), I get the following:
The limit of '0' for Top query has been exceeded. The value from the incoming request is '10'.
I've compared my code to the sample and didn't think I was missing anything.