BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Entity Framework CTP for VS 2010

| by Jonathan Allen Follow 133 Followers on Jun 24, 2009. Estimated reading time: 1 minute |

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.

Rate this Article

Adoption Stage
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.

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

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT