In this post you’ll see how Code First and the DbContext class in Entity Framework 4.1 RC will work with WCF Data Services going forward.

WCF Data Services in .NET 4.0 was released prior to the Entity Framework 4.1 RC and so does not natively know about the DbContext classThere are numerous posts already on how to get DbContext to work with WCF Data Services in .NET 4.0, including this one by Rowan Miller.

These posts talk about how to write some extra code to initialize the DataService classThis is not how we envisioned these technologies working togetherHowever, it is possible to see how these technologies were meant to work together by using EF 4.1 RC along with the Microsoft WCF Data Services 2011 CTP2.

In this walk through we’ll build a simple WCF Data Service using Code First with the latest and greatest releasesThis post does assume some knowledge of Code First, DbContext, and WCF Data Services...
Shout it
Telerik – OpenAccess ORM
.