WCF Data Services 5.2.0 with UriParser Support
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.
Iordanis Giannakakis, Savvas Dalkitsis Aug 28, 2015
Ben Linders Aug 28, 2015