config.MapODataServiceRoute error

后端 未结 6 2507
滥情空心
滥情空心 2021-02-19 03:38

I am currently following this guide -> Link to asp.net website

As the guide says I added all the necessary packages via the nuget console and added the necessary usings

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-19 04:29

    FOR OData V3

    1. Install Microsoft.AspNet.WebApi.OData
    2. Add using System.Web.Http.OData.Builder; and using System.Web.Http.OData.Extensions;
    3. use like config.Routes.MapODataServiceRoute(...)

    FOR OData V4

    1. Install Microsoft.AspNet.OData
    2. Add using System.Web.OData.Builder; and using System.Web.OData.Extensions;
    3. use like config.MapODataServiceRoute(...)

    Dont get stuck on WebApi word, they are both for web api.

提交回复
热议问题