Close this search box.

< Countdown to Software Architect 2009 – Day two and my love for Boot from VHD | Home | Countdown to Software Architect 2009 – Day three was Entity Framework 4 day. I love it!

Entity Framework 4.0 Resources – documentation links, best blog posts and more

This is one of a series of posts on my preparations for sessions on Azure and ORMs at Software Architect 2009.

[Initual release 22nd Sept 2009]
[Updated 23rd Sept, with links from Julie Lerman]
[Updated 2nd Oct, with slidedeck section]
[Large Update 15th Dec – including PDC09 content, my new posts and plenty of stuff from Julie L, Tony and others]

This is my attempt to pull together all (ok – most) of the improvements in Entity Framework 4.0 and aggregate useful resources against each. It is very much work in progress – but is hopefully already fairly helpful.

Some of the links are to early posts which came out pre VS2010 Beta 1. These should be treated with caution as a lot changed since they were written – but they often start with a good introduction to the topic and hence I felt they were worth including.

General Resources


Overview blog posts/articles

Team Blogs

Community Bloggers

Screencasts and Podcasts


Eric Nelson overview of Impact of ORM and Entity Framework 4 on Architecture


Improvements to the Tools/Designer

Persistence Ignorance

You can use your own custom data classes together with your data model without making any modifications to the data classes themselves. This means that you can use “plain old” CLR objects (POCO), such as existing domain objects, with your Entity Framework application. For more information, see Persistence Ignorant Objects (Entity Framework).

And from the community:


In NET 4.0 Beta 1 we introduced Model-First which allowed you to begin by creating an entity data model, then use it to create an empty database and classes. The subsequent CTP introduced Code Only.

And from the community:

Code Only looking good (Dec 2009)

Deferred Loading of Related Objects (aka Lazy Loading)

With deferred loading, also known as lazy loading, related objects are automatically loaded from the data source when you access a navigation property. For more information, see Shaping Query Results (Entity Framework).

Foreign Key associations

Foreign Keys are now surfaced.

Query Improvements


In Beta 1 we added an improved API for reporting changes: ChangeObjectState, ChangeRelationshipState, ApplyOriginalValues. In the CTP we added Self-tracking entities: serialize changes alongside current state in the object graph

Improving Testability of the Entity Framework

Unit testing EF v1 is tricky (Check out Julies post on this). Things get a lot better with EF 4.0 thanks to a combination of features:

  • POCO  – classes that do not depend on the EF can be easier to test
  • Data Access Guidance and the Repository pattern – work in progress 
  • New IObjectSet<T>  interface makes it easier to fake an object
  • Template based code generation – control the code gen 
  • LINQ to Entities improvements make LINQ to Entities and LINQ to Objects closer – which can simplify testing
  • Sneak Preview: Entity Framework 4.0 Testability Improvements
Shout it
kick it on

Wednesday, September 23, 2009 3:16 PM

This article is part of the GWB Archives. Original Author:  Eric Nelson

Related Posts