AttachAsModified – a small step toward simplifying EF n-tier patterns

During this week at PDC I had a lot of great discussions with folks who are working with the EF—some of them just evaluating it and others deep into projects built on it.  As it turns out much of the feedback that I heard came as no surprise.  One of the most common recurring themes…


Using T4 Templates to generate EF classes

Spurred on both by the success of Damien Guard in using T4 to generate Linq to SQL code and of Jeff Reed from the EF team who built a prototype for using T4 to generate EF code, I recently hacked something up that makes it fairly easy to use T4 to generate EF classes.  This is…


Having fun at PDC

If you are at the PDC this week and you are interested in the Entity Framework or LINQ to SQL, then I’d love to chat with you.  Drop me some email or leave a comment here, and we’ll find some time and place to meet. If you aren’t at the PDC, then I highly recommend…


Let the 3rd party EF providers roll!

I know I haven’t been making posts with much in the way of original content for quite some time.  My apologies. In the meantime, I just can’t resist pointing out this post on the team blog:  This is really cool!  You can now use the EF against Oracle, MySQL and PostgreSQL. – Danny…


.Net Rocks podcast about the EF Advisory Council now available for download

If you’re not sick and tired of hearing my voice after all the other .Net Rocks/dnrTV things lately, you might want to check out the latest .Net Rocks podcast at  It’s hot off the presses.  Usually .Net Rocks shows are recorded several weeks in advance, but this is one that we recorded just yesterday…


EF FAQ updated

As always, the FAQ lives at New in this version of the FAQ… ·         Upgraded to version 1.0 in honor of EF v1.0 shipping. ·         Re-organized into multiple sections to improve load/update times (re-numbered sections in the process). ·         Updated: 1.2 Where else should I go to learn more about the EF? ·         Updated:…



Part of the Entity Framework FAQ. 18.       Multi-threading 18.1.What is the recommendation for running a multithreaded application on Entity Framework?  Is Entity Framework thread-safe? Entity Framework, like most of the rest of the .Net framework, is by and large NOT thread-safe. So if you want to interact with the entity framework or your entity classes…


Entity Services, Metadata & Mapping

Part of the Entity Framework FAQ. 13.       EDM 13.1.Does Entity Framework support Abstract types in EDM models? In Entity Framework it is possible to declare Abstract types in EDM model (csdl file) — i.e. no entity instances can be created for these types, but types can be derived from them.  In fact, types can be…


Object Services & Using the APIs

Part of the Entity Framework FAQ. 9.   Object Services 9.1.   What is ObjectContext.Detach() method used for? ObjectContext.Detach() — will detach an object from the ObjectStateManager associated with an object context so that it can be attached to some other context or reclaimed by the garbage collector. For more information, see Detaching Objects (Entity Framework). 9.2.  …



Part of the Entity Framework FAQ. 6.   Query 6.1.   How is Span used?  What is Span?  (aka. How does the EF support eager-loading?) The span feature makes it possible to pre-fetch related entities.  Span can be defined as a builder method, “Include”, which makes it simpler to specify span rules in LINQ to Entities queries….