Описание тега asp.net-web-api-odata
The ASP.NET Web API OData package offers support for the OData protocol in ASP.NET Web API.
OData is a standard protocol for creating and consuming data. The purpose of OData is to provide a protocol that is based on Representational State Transfer (REST) for create, read, update, and delete (CRUD) operations. OData applies web technologies such as HTTP and JavaScript Object Notation (JSON) to provide unified convention based access to information from various programs. OData provides the following benefits:
- It lets developers interact with data by using RESTful web services.
- It provides a simple and uniform way to share data in a discoverable manner.
- It enables broad integration across products.
- It enables integration by using the HTTP protocol stack.
Two key defining features of OData over traditional RESTful APIs are the URL conventions that make it possible to compose queries that request only the specific fields and navigation links from resources that are needed on the client as well as the ability to partially update resources using the PATCH
HTTP verb.
- Together these features allow individual clients to reduce the data sent across the wire without needing changes in the API or data schema to support this.
ASP.NET Web API supports both Version 3 and Version 4 of the OData protocol.
Learn more about ASP.NET Web API OData on MSDN
The code from this package to implement this protocol makes heavy use of Language Integrated Query (LINQ) expressions to support deferred execution of client requests, in a sense the ODataLib translates a specific set of URL queries into LINQ queries.
While not required, the ASP.NET implementation has extensive support for using Entity-Framework to access the data layer, reducing the code necessary to expose EF data schemas as OData resources. For this reason Posts on SO related to this tag will often include EF references and concepts.
You can also find more information on:
Write a simple OData V4 service