OData Error: The query specified in the URI is not valid. The property cannot be used in the query option

后端 未结 2 1812
太阳男子
太阳男子 2020-12-13 17:32

I\'m trying to get an OData endpoint up and working and I\'m having this error that even Google doesn\'t have much to say about.

I have created an Entity Framework E

2条回答
  •  萌比男神i
    2020-12-13 18:09

    To answer the question asked by @NickG et al: in .Net Core, you do something similar:

    private static IEdmModel GetEdmModel()
    {
        var builder = new ODataConventionModelBuilder();
        var products = builder.EntitySet("Products");
        products.EntityType.Count().Filter().OrderBy().Expand().Select();
        return builder.GetEdmModel();
    }
    

提交回复
热议问题