WebAPI and ODataController return 406 Not Acceptable

前端 未结 13 1257
余生分开走
余生分开走 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条回答
  •  温柔的废话
    2020-12-02 12:54

    In my case I needed to change a non-public property setter to public.

    public string PersonHairColorText { get; internal set; }
    

    Needed to be changed to:

    public string PersonHairColorText { get; set; }
    

提交回复
热议问题