Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 998
Brehbreh Avatar asked Aug 04 '16 17:08

Brehbreh


People also ask

What is WebApi OData?

The Open Data Protocol (OData) is a data access protocol for the web. OData provides a uniform way to query and manipulate data sets through CRUD operations (create, read, update, and delete). ASP.NET Web API supports both v3 and v4 of the protocol.

What is Microsoft AspNet WebApi core?

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the . NET Framework. 133.5M. Microsoft.AspNet.WebApi.Owin.

What is OData in .NET core?

OData stands for Open Data Protocol that helps to build and consuming of RESTFul APIs. It is an ISO/IEC approved and OASIS standard. OData will take care of various approaches about RESTful API like Status codes, URL conventions, request and response headers, media types, query options, payload formats, etc.


1 Answers

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.)

like image 67
StriplingWarrior Avatar answered Sep 21 '22 22:09

StriplingWarrior