CodeSnips

Monday, September 24, 2012

WCF Data Service version 5 OData V3 Support

Finally, Entity Framework Code First DbContext is supported by the WCF Data Service, as well as additional features in the OData standard.  Version 5.0 download here

There a few steps you need to take to upgrade your WCF Data Service though. (details here)

Strangely, support for JSONP was left out of this new release. If you are using this workaround, as I am, it's a one line fix - change the Accept header fix-up to: application/json;odata=verbose

When you add a new WCF Data Service into a Visual Studio web project, you'll have to repeat the steps given above, unless you are willing to dig under the covers (I am not ;) and create an item template for the new version in Visual Studio.

A couple of other interesting links:
WCF Data Services Toolkit  - An OData framework for incorporating non-SQL (or more accurately non-Entity Framework) data sources into an OData service.

JayData - a linq-like javascript library that can use Odata. (uses DataJS under the covers)

No comments:

Post a Comment