The OData .NET Libraries (or OData.NET, for short) project includes the implementation of the OData protocol on the .NET platform. It is a fully open sourced project maintained by the OData team of Microsoft.
OData stands for the Open Data Protocol. It was initiated by Microsoft and is now an OASIS standard. OData enables the creation and consumption of REST APIs, which allow resources, identified using URLs and defined in a data model, to be published and edited by Web clients using simple HTTP messages.
For more information about OData, please refer to the following resources:
The project currently has three branches: master, ODATAV3, and WCFDSV4.
The master branch includes the .NET libraries for OData V4 only that are now most actively iterated and maintained by the OData team. It has the following libraries:
- ODataLib (namespace
Microsoft.OData.Core
):
The ODataLib contains classes to serialize, deserialize and validate OData JSON payloads. - EdmLib (namespace
Microsoft.OData.Edm
):
The EdmLib contains classes to represent, construct, parse, serialize and validate entity data models. - OData Client for .NET (namespace
Microsoft.OData.Client
):
The client library is built on top of ODataLib and EdmLib that has LINQ-enabled client APIs for issuing OData queries and consuming OData JSON payloads. - Microsoft.Spatial (namespace
Microsoft.Spatial
):
The spatial library contains classes and methods that facilitate geography and geometry spatial operations.
For these libraries, we accept bug reports, feature requirements and pull requests. The corresponding fixes and implementations will be included into every new release.
The release of the component binaries is carried out monthly through Nuget.
The ODATAV3 branch includes the .NET libraries for OData V1-3 only. It has the similar libraries as the master branch does except for some differences in namespaces and two additional libraries:
- ODataLib for OData v1-3 (namespace
Microsoft.Data.Core
): - EdmLib for OData v1-3 (namespace
Microsoft.Data.Edm
): - WCF Data Services Client for OData v1-3 (namespace
Microsoft.Data.Services.Client
): - System.Spatial for OData v1-3 (namespace
System.Spatial
): - WCF Data Services Server for OData v1-3 (namespace
Microsoft.Data.Services
):
Fully-featured server API for responding to OData queries and consuming/producing OData payloads. - WCF Data Services EntityFramework Provider (namespace
Microsoft.OData.EntityFrameworkProvider
):
Server API for responding to OData queries and consuming/producing OData payloads based on entity framework version 6.0 or higher Supports OData v3.
These libraries are in maintenance mode. Only security bugs will be accepted. The release will be irregular depends on the bugs fixed.
The WCFDSV4 branch has the source code of the OData V4 parity of the WCF Data Services Server for OData v1-3. It is only for cloning and doesn't accept contributions. There is no binary release of it either.
Simply open the solution files under 'sln' and build them in Visual Studio IDE.
Here is the usage of each solution file:
- Microsoft.OData.Lite.sln - Product source and minimal functional tests. Recommended for doing general bugfix and feature development.
- Microsoft.OData.Full.sln - Product source and full functional tests. Used to fully test your code.
- Microsoft.OData.E2E.sln - Product source and end-to-end tests.
- Microsoft.OData.CodeGen.sln - Source and tests for OData T4 client code generator.
Each solution contains some test projects. Please open it, build it and run all the tests in the test explorer. For running tests within Microsoft.OData.Full.sln and Microsoft.OData.E2E.sln, you will need to have SQL Express installed and you must open the solution as Administrator. Visual Studio must be running administratively to have the permission to start the test services in IIS Express. You must have SQL Express installed because a test Entity Framework database is needed and it will be automatically initialized if it doesn't exist.
*One-click build and test script will be available in the future.
We keep uploading the daily nightly signed NuGet packages for ODataLib/EdmLib/ClientLib/SpatialLib to our MyGet feed: https://www.myget.org/F/odlnightly.
You can query the latest nightly NuGet packages using the following MAGIC OData query: https://www.myget.org/F/odlnightly/Packages?$select=Id,Version&$orderby=Version%20desc&$top=4&$format=application/json
Please refer to the CONTRIBUTION.md.
- Team blog
Please visit http://blogs.msdn.com/b/odatateam/. - Feedback
Please send mails to odatafeedback@microsoft.com. - Questions
Ask questions on Stack Overflow.