WebAPI and ODataController return 406 Not Acceptable

前端 未结 13 1267
余生分开走
余生分开走 2020-12-02 12:25

Before adding OData to my project, my routes where set up like this:

       config.Routes.MapHttpRoute(
            name: \"ApiById\",
            routeTempl         


        
13条回答
  •  萌比男神i
    2020-12-02 13:08

    My issue was related to returning the entity model instead of the model I exposed (builder.EntitySet("Products");). Solution was to map entity to resource model.

提交回复
热议问题