BT

Entity Framework CTP for VS 2010

by Jonathan Allen on Jun 24, 2009 |

Not everything planned for Visual Studio 2010 made it in beta 1. This includes some important features for ORM fans. Entity Framework CTP 1 includes support for Self Tracking Entities, POCO Templates, and support for EDMX-free coding.

Self Tracking Entities are entities that include internal change tracking. The primary use case is remote clients that communicate via WCF. Changes are tracked locally, then the change graph is sent back to the server. Once on the server, the changes are validated and saved to the database using Entity Framework. Diego Vega writes,

The main goal behind designing self tracking entities as POCO classes is that they don’t require Entity Framework to be used on the client computer in distributed scenarios. In order to facilitate working with self tracking entities when they are serialized on the client, we are going to share the code for the types themselves between the service and the client.

Potentially, we could adapt self tracking entities to work with versions of the CLR that do not contain Entity Framework at all, such as Silverlight 3.

Next up is POCO Templates. POCO templates still operate on EDMX files, but they divide the template into two parts. The first template generates the data classes themselves and the FixupCollection class needed to track changes. The second template generates the ObjectContext needed for interacting with a database.

By splitting the template into two, one part that generates the Entities and ComplexTypes and one that generates a strongly typed context, it makes it possible not only to have Entities and ComplexType that are persistence ignorant but further to put those classes in an assembly / project that has no persistence aware code in it at all.

The last headline feature is known as “Code Only”. Essentially the feature allows you to use Entity Framework without EDMX files. This feature is still in the early stages and has numerous limitations such as ManyToMany relationships not being supported.

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.

Tell us what you think

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

Email me replies to any of my messages in this thread
Community comments

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT