What is the difference between Microsoft.AspNet.WebApi.OData and Microsoft.Data.OData and Microsoft.AspNet.OData?

与世无争的帅哥 提交于 2021-02-06 15:14:24

问题


I am creating a RESTful service using Web API and Entity Framework with OData endpoints. The Microsoft.AspNet.WebApi.OData and Microsoft.Data.OData and Microsoft.AspNet.OData packages seem to overlap, so I wasn't sure which one to use. What are the differences between them? What are the pros and cons of each?


回答1:


Microsoft.AspNet.OData is the one you'll most likely want to use for a new project. It sets up Web API to use the OData 4 protocol.

Microsoft.AspNet.WebApi.OData is the older package for OData v1-3. It has a dependency on some of the core OData pieces from Microsoft.Data.OData, which is the "ODataLib" package for OData v1-3. (The OData v4 version of this is Microsoft.OData.Core, which is a dependency of Microsoft.AspNet.OData.)



来源:https://stackoverflow.com/questions/38774217/what-is-the-difference-between-microsoft-aspnet-webapi-odata-and-microsoft-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!