Include Method Extension for IObjectSet What about the mocks?

Posted on Dot net Slackers See other posts from Dot net Slackers
Published on Mon, 22 Mar 2010 00:00:00 GMT Indexed on 2010/03/22 17:01 UTC
Read the original article Hit count: 346

Filed under:
Eager loading with Entity Framework depends on the special ObjectQuery.Include method. We’ve had that from Day 1 (first version of ef). Now we use ObjectSets in EF4 which inherit from ObjectQuery (thereby inheriting Include) and also implement IObjectSet. IObjectSet allows us to break the queries apart from ObjectQuery and ObjectContext so we can write persistent ignorant, testable code. But IObjectSet doesn’t come with the Include method and you have to create an extension method to...

Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.



Email this Article

© Dot net Slackers or respective owner