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 a few branches: master, gh-pages, 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 gh-pages branch contains documentation source for OData v4 Lib - tutorials, guides, etc. The documention source is in Markdown format.
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 need to open the solution as Administrator so that the test services can be started properly. You must have either SQL Express 2008+ (in the case of VS2013) or LocalDB v12.0+ (in the case of VS2015) installed because a test database is needed and it will be automatically initialized by the test code if it doesn't exist.
In an elevated command prompt "Run as administrator", cd to the root folder:
build.cmd
The build and test will take about 15 minutes. Here are some other usages:
build.cmd Nightly
. Build and run all nightly test suites.build.cmd Rolling
. Build and run all rolling test suites (with less legacy tests thus faster).build.cmd SkipStrongName
. Configure strong name skip of OData libraries on your machine and build (no test run).build.cmd DisableSkipStrongName
. Disable strong name skip of OData libraries on your machine and build (no test run).
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 visit the ODataLib pages.
Please refer to the How to debug.
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.