OData

Create and consume RESTful APIs in a simple and standard way

Latest posts

Jul 4, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Using ODataUriParser for OData V4

Karata Liu

Background This post is intended to guide you through the UriParser for OData V4, which is released within ODataLib V6.0 and later. You may have already read the following posts about OData UriParser in ODataLib V5.x: Some parts of the articles still apply to V4 UriParser, such as introduction for ODataPath and QueryNode hierarchy. In this post, we will deal with API changes and features newly introduced. UriParser Overview The main reference document for UriParser is the URL Conventions specification. The ODataUriParser class is its main implementation in ODataLib. The ODataUriParser class ...

Jul 3, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.5.0 Release

LeoHu1

We are happy to announce that the ODL 6.5.0 is released and available on nuget along with the source code oncodeplex (please read the git history for the v6.5.0 code info and all previous version). Detailed release notes are listed below. Bug Fix New Features A type definition defines a specialization of one of the primitive types. for details please refer to here.  A shared model that contains type defs for unsigned integers is defined. we will have a blog post on this website soon about how to use it in your service.   $count is used to request only the ...

Jun 30, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Refering when Constructing EDM Model

Liang Wang [MSFT]

Introduction EDM model plays a very important role in OData. When you want to use OData, the first thing should be constructing an EDM model. Previously, you need to build a complete EDM model, which means all types, terms, operations used in an EDM model should be declared in itself. If there are some elements in an existing model (CSDL), which you want to use when constructing a new model. The only method is “re-declared” them in the new model before using. It is costly and unworthy. Now, ODL provides a feature called “Model Reference”. If the new model (referencing model) want to use some types in an existing...

Jun 24, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.4.0 Release

LeoHu1

We are happy to announce that the ODL 6.4.0 is released and available on nuget along with the source code oncodeplex (please read the git history for the v6.4.0 code info and all previous version). Detailed release notes are listed below. Bug Fix New Features   ODataLib now supports new aysnc API in .Net 4.0. For example you can now use code like:  var customers = await ctx.Customers.ExecuteAsync(); please refer to this blog post http://blogs.msdn.com/b/odatateam/archive/2014/03/18/use-enumeration-types-in-odata.aspx On client side you should be able to wri...

Jun 22, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] How to enable authentication for metadata documents in the OData Client Code Generator

Layla Liu

Currently, the OData Client Code Generator doesn’t support authentication for metadata documents. Although authenticating the access to OData metadata documents is not encouraged for service builders unless they has a good reason to do so, However, it might not be easy to exclude $metadata from the authentication required by the service. So in this tutorial, I will give a sample on how to update the OData Client Code Generator to customize the metadata documents authentication support. Update the Code Generator Files You can follow “How to use OData client code generator to generate client side proxy class”...

Apr 30, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.3.0 Release

LeoHu1

We are happy to announce that the ODL 6.3.0 is released and available on nuget along with the source code oncodeplex (please read the git history for the v6.3.0 code info and allprevious version). Detailed release notes are listed below. Bug Fix New Features   ODataLib now supports referencing external CSDL document by using the edmx:Reference element, or specifies the schemas and annotations to include from the target document using the edmx:Include and edmx:IncludeAnnotations element, The scope of a CSDL document is now the document itself and all schemas inclu...

Apr 29, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] How to Use Open Type in OData

Liang Wang [MSFT]

OData protocol introduces conception of open type which allows clients to add properties dynamically to instances of the type by specifying uniquely named values in the payload used to insert or update an instance of the type. This makes definition of entity type or complex type more flexible. Developers do not have to define everything which is probably used in the edm model. Server Side 1. Model Definition It is quite easy to define an open entity type or open complex type in server side. If a server uses CSDL file to define the data model, only adding an attribute OpenType="true" to the node of the...

Apr 14, 2014
Post comments count 0
Post likes count 0

[Announcement] ODataLib 6.2.0 release

LeoHu1

We are happy to announce that the ODL 6.2.0 is released and available on nuget along with the source code on codeplex (please read the git history for the v6.2.0 code info and allprevious version). Detailed release notes are listed below. Bug fixes Fixed a bug for parsing $it in UriParser. Improved the JSON serialization performance for unindented format. New Features Known Issues Call to Action You and your team are highly welcomed to try out this new version if you are interested in the new features and fixes above. For any feature request, issue or idea please feel free to reach out t...

Apr 9, 2014
Post comments count 0
Post likes count 0

[Tutorial & Sample] Client Property Tracking for PATCH

Layla Liu

  In OData Client for .NET 6.2.0, we enabled the top level property tracking on client side when sending a PATCH. This feature allows client to send only updated properties, instead of the entire object to server. The top level property tracking means the client will only track the highest level properties in the class hierarchy. In other words, if customer is updating a property under a complex type property, or an item in a collection property under an entity, the client will send the entire complex type property (including unchanged properties under the complex property) or the entire collection (in...