BT

InfoQ Homepage News WCF Data Services 5.2.0 with UriParser Support

WCF Data Services 5.2.0 with UriParser Support

This item in chinese

Bookmarks

Microsoft recently released WCF Data Services 5.2.0 with support for UriParser from ODataLib Contrib which provides an ability to parse $filter and $orderby expressions into a metadata bound abstract syntax tree. It is normally used by higher level libraries such as WCF Data Services and Web API.

In order to parse a filter expression, you need to make use of ParseFilter() method which returns a FilterClause object. The method accepts four arguments as follows

public static FilterClause ParseFilter(string filter, IEdmModel model, IEdmType elementType, IEdmEntitySet entitySet)

The Expression property on the FilterClause object contains the root node of the abstract syntax tree that represents the filter expression. You can dissect the nodes by using the Kind property with a simple switch-case program.

In order to parse an orderby expression, you have to make use of ODataUriParser.ParseOrderBy method which is very similar to ParseFilter() method. Alex D James, Program Manager, Microsoft has examined in detail the functionality of $filter and $orderby using the ODataUriParser in his blog.

WCF Data Services 5.2.0 provides bug fix for an issue where code gen for exceedingly large models would cause Visual Studio to crash.Moreover, it also fixes issues where IgnoreMissingProperties did not work properly with the new JSON format and where an Atom response is unable to be read if the client is set to use the new JSON format. The recent release also provides a better error message when the service model exposes enum properties.

"We have invested a little bit more in improving the overall stability and performance of WCF Data Services and will continue to provide enhancements over the next several releases," says dpblogs who works with SQL Connectivity team at Microsoft.

WCF Data Services 5.2.0 is available in following formats

"WCF Data Services has many new features in it and may not be backwards compatible with Visual Studio 2012 / LightSwitch. There was a denial of service vulnerability in OData 5.0; the new 5.0 bits released recently address this issue." says Matt Evans who works with Visual Studio product team at Microsoft.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.