<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx</link><description>In my post last week on the POCO Experience in Entity Framework , I covered the fundamentals of POCO support in Entity Framework 4.0. In this post, I’ll cover a few more aspects related to POCO. Complex Types Complex Types are supported in POCO just like</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>POCO in the Entity Framework : Part 2 ??? Complex Types, Deferred Loading and Explicit Loading | ASP NET Hosting</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9647772</link><pubDate>Thu, 28 May 2009 19:26:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9647772</guid><dc:creator>POCO in the Entity Framework : Part 2 ??? Complex Types, Deferred Loading and Explicit Loading | ASP NET Hosting</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://asp-net-hosting.simplynetdev.com/poco-in-the-entity-framework-part-2-%e2%80%93-complex-types-deferred-loading-and-explicit-loading/"&gt;http://asp-net-hosting.simplynetdev.com/poco-in-the-entity-framework-part-2-%e2%80%93-complex-types-deferred-loading-and-explicit-loading/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9649366</link><pubDate>Fri, 29 May 2009 01:33:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9649366</guid><dc:creator>Peter Goodman</dc:creator><description>&lt;p&gt;There is an issue in NHibernate dynamic proxies with inheritance. Lets say we have a Customer entity which references an Account entity, Account can be SavingsAccount or ChequeAccount via Inheritance. &lt;/p&gt;
&lt;p&gt;When following the lazily-loaded Account association, the actual target type cannot be determined easily as the proxy is subclassing the Account entity type instead of the actual Account type (Savings or Cheque) so a standard &amp;quot;is&amp;quot; will not work.&lt;/p&gt;
&lt;p&gt;Has this been considered?&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9650833</link><pubDate>Fri, 29 May 2009 02:35:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9650833</guid><dc:creator>Karl</dc:creator><description>&lt;p&gt;@Peter: You might have missed:&lt;/p&gt;
&lt;p&gt;2 - You cannot use inheritance with your complex type classes&lt;/p&gt;
</description></item><item><title>Why Defer Loading in Entity Framework isn</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9651097</link><pubDate>Fri, 29 May 2009 03:04:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9651097</guid><dc:creator>Ayende @ Rahien</dc:creator><description>&lt;p&gt;Why Defer Loading in Entity Framework isn&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9651210</link><pubDate>Fri, 29 May 2009 03:36:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9651210</guid><dc:creator>joe</dc:creator><description>&lt;p&gt;IPOCO still makes me chortle.&lt;/p&gt;
&lt;p&gt;Just out of curiosity, why are you guys calling it &amp;nbsp;&amp;quot;deferred loading&amp;quot;, when the rest of the world has settled on &amp;quot;lazy&amp;quot; (and his holiness the Reverend Martin Fowler even formalized the pattern name)? &amp;nbsp;Is there a subtle difference in the two?&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9651982</link><pubDate>Fri, 29 May 2009 09:32:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9651982</guid><dc:creator>divega@microsoft.com</dc:creator><description>&lt;p&gt;@Joe,&lt;/p&gt;
&lt;p&gt;There is actually no subtle conceptual difference between &amp;quot;deferred loading&amp;quot; and &amp;quot;lazy loading&amp;quot;. Deferred and lazy are being used as synonyms. The main reason we tend to use deferred internally and in the documentation is that the name of the API that you use to turn it on and off is “DeferredLoadingEnabled”. &lt;/p&gt;
&lt;p&gt;This flag was named like that after the homologous flag in LINQ to SQL, which has had this feature since .NET 3.5. &lt;/p&gt;
&lt;p&gt;I can assure you we are listening to the feedback on this.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Diego&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9652634</link><pubDate>Fri, 29 May 2009 13:59:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9652634</guid><dc:creator>Mike Scott</dc:creator><description>&lt;p&gt;+1 for calling it by the established name, lazy loading.&lt;/p&gt;
&lt;p&gt;In case you missed Ayende's post, have you considered the valid issues he raises here: &lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://ayende.com/Blog/archive/2009/05/29/why-defer-loading-in-entity-framework-isnrsquot-going-to-work.aspx"&gt;http://ayende.com/Blog/archive/2009/05/29/why-defer-loading-in-entity-framework-isnrsquot-going-to-work.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This road has already been followed by NHibernate and found to lead to a dead end. Please consider the points Ayende raises.&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9652818</link><pubDate>Fri, 29 May 2009 15:19:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9652818</guid><dc:creator>Imran</dc:creator><description>&lt;p&gt;Is inheritance support planned for a future release? Lack of inheritence support would be quite limiting in DDD scenarios. If inheritance is not supported the entity model will not be as 'rich' and the need for a complex persistence framework is somewhat reduced. This might limit the use of entity framework to only trivial applications.&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9652828</link><pubDate>Fri, 29 May 2009 15:26:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9652828</guid><dc:creator>simon.segal</dc:creator><description>&lt;p&gt;Faisal&lt;/p&gt;
&lt;p&gt;What is the behaviour when I mix and match .Includes() with context.ContextOptions.DeferredLoadingEnabled = true ? Will the eager and lazy fetching work independently across the single ObjectContext in the same query?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
</description></item><item><title>POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9653275</link><pubDate>Fri, 29 May 2009 17:45:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9653275</guid><dc:creator>progg.ru</dc:creator><description>&lt;p&gt;Thank you for submitting this cool story - Trackback from progg.ru&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9653970</link><pubDate>Fri, 29 May 2009 19:21:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9653970</guid><dc:creator>sergejus</dc:creator><description>&lt;p&gt;I have actually a question on statement:&lt;/p&gt;
&lt;p&gt;&amp;quot;In order to enable creation of proxy instances for adding/attaching, you can use the CreateObject factory method on ObjectContext for creating entity instances&amp;quot;&lt;/p&gt;
&lt;p&gt;I've successfully newed POCO with all properties declared as virtual just with new operator. Context.AddObject worked for me like a charm!&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9657025</link><pubDate>Fri, 29 May 2009 23:07:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9657025</guid><dc:creator>Hemanshu Bhojak</dc:creator><description>&lt;p&gt;Persistence ignorance means you can switch your persistence layer from EF to something else without affecting your model. But what the EF proposes for using with POCO is all contrary to PI. First it wants me to create a model from the DB and it imposes rules like marking a property virtual to achieve lazy loading. This may not be favorably to my model. I guess MS is going all in the wrong direction. &amp;nbsp;&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9658681</link><pubDate>Sat, 30 May 2009 00:38:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9658681</guid><dc:creator>divega@microsoft.com</dc:creator><description>&lt;p&gt;@Peter and Karl,&lt;/p&gt;
&lt;p&gt;We don't support inheritance of complex types, but I think Peter is referring to entity types, for which we support inheritance. &lt;/p&gt;
&lt;p&gt;On the other side, I am not sure I understand Peter’s question correctly, so I am just going to try to explain how inheritance interacts with proxies:&lt;/p&gt;
&lt;p&gt;Let’s say you have Account and SavingsAccount and ChequeAccount that derive from it. EF can create proxy types for all the concrete types of the hierarchy. For instance, let’s assume that Account is abstract, then it will create SavingsAccount’ and ChequeAccount’. &lt;/p&gt;
&lt;p&gt;SavingsAccount’ is a SavingAccount and an Account, since it derives from SavingsAccount. ChequeAccount’ is a ChequeAccount and an Account, since it derives from ChequeAccount.&lt;/p&gt;
&lt;p&gt;Now, let’s assume that Account is not abstract. Then EF can also create a proxy type for Account, Account’. &lt;/p&gt;
&lt;p&gt;In the case you have two instances of Account’ and SavingsAccount’, if you try to establish if the type of the first instance is assignable from the type of the other instance, the answer will be no. They both derive from a common root, but they are on different branches of the inheritance tree. &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Diego&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9659140</link><pubDate>Sat, 30 May 2009 01:05:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9659140</guid><dc:creator>divega@microsoft.com</dc:creator><description>&lt;p&gt;@Hemanshu, &lt;/p&gt;
&lt;p&gt;EF in .NET 4.0 works with pure POCO objects, using a snapshot based change detection mechanism. &lt;/p&gt;
&lt;p&gt;It is true that in Visual Studio 2008 you could only create the model from the database or start with a model from scratch. But the EDM designer in Visual Studio 2010 also supports creating the database schema from your model. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;In that case, you can have non-virtual properties and use the new keyword to get new instance. &lt;/p&gt;
&lt;p&gt;If you specify properties as virtual we can subclass your entity types and provide with services that you probably wouldn’t want to code yourself inside your entities (precisely because they need to use the persistence infrastructure).&lt;/p&gt;
&lt;p&gt;Even in that case, we support object graphs that are a mix of proxies and non-proxies: objects that came from server queries, objects that you instantiated yourself using new or the CreateObject&amp;lt;T&amp;gt; factory method, can be connected, and we will use a mix of snapshot and notification based change tracking.&lt;/p&gt;
&lt;p&gt;Lazy loading is an interesting example because it means that navigation properties in your model acquire query capabilities, which clearly belong inthe persistence infraestructure. &lt;/p&gt;
&lt;p&gt;If you had to write that code yourself, you would need to somehow invoke the persistence framework from inside your entity. &lt;/p&gt;
&lt;p&gt;I would like to understand what your expectations are. How would you get lazy loading to work and still preserve persistence ignorance of your code without something like a proxy?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Diego&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9659327</link><pubDate>Sat, 30 May 2009 01:14:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9659327</guid><dc:creator>divega@microsoft.com</dc:creator><description>&lt;p&gt;@sergejus,&lt;/p&gt;
&lt;p&gt;Glad to hear that non-proxy POCO objects work like a charm for you :). Change trackig proxies optimize the change tracking mechanism by enabling change notifications and removing the need to do a snapshot comparison to detect whether an entity has been modified. But regular POCO entities work as well, even mixed with proxies in the same object graph.&lt;/p&gt;
&lt;p&gt;The overhead of detecting changes using snapshot is not that big in many scenarios. &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Diego&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9659411</link><pubDate>Sat, 30 May 2009 01:19:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9659411</guid><dc:creator>divega@microsoft.com</dc:creator><description>&lt;p&gt;@Simon.Segal&lt;/p&gt;
&lt;p&gt;Yes, eager loading and lazy loading can be mixed in the same context. You specify eager loading at the ObjectQuery level using Include and lazy loading at the ObjectContext level. Eager loading will load all the requiered paths in a single shot and you can continue loading from there lazyly as you navigate your object graph.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Diego&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9665549</link><pubDate>Sat, 30 May 2009 16:59:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9665549</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;Thank you for adding the lambda expression support for LoadProperty! L2S made great use of generics instead of strings which not only provides type-safety, but allows easy refactoring.&lt;/p&gt;
</description></item><item><title>ADO.NET team blog : POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9667036</link><pubDate>Sun, 31 May 2009 06:09:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9667036</guid><dc:creator>9eFish</dc:creator><description>&lt;p&gt;9efish.感谢你的文章 - Trackback from 9eFish&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9670797</link><pubDate>Sun, 31 May 2009 21:16:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9670797</guid><dc:creator>Hemanshu Bhojak</dc:creator><description>&lt;p&gt;I have an existing model and want to provide lazy loading for a child. Is it possible to do that without marking it virtual. &lt;/p&gt;
&lt;p&gt;I am currently using proxy objects to do the same.&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9674868</link><pubDate>Mon, 01 Jun 2009 08:33:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9674868</guid><dc:creator>divega@microsoft.com</dc:creator><description>&lt;p&gt;@Hemanshu, what kind of proxy object are you using now? In Entity Framework, proxy objects derive from the original POCO class and therefore require proerties to be virtual in order to override their behavior and enable things like lazy loading.&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9675011</link><pubDate>Mon, 01 Jun 2009 09:00:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9675011</guid><dc:creator>Hemanshu Bhojak</dc:creator><description>&lt;p&gt;For all the children (IList) I attach a proxy IList which uses the lazy load pattern to provide deferred loading...&lt;/p&gt;
</description></item><item><title>New  and Notable 325</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9678476</link><pubDate>Mon, 01 Jun 2009 19:32:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9678476</guid><dc:creator>Sam Gentile's Blog (if (DeveloperTask == Communication &amp;&amp; OS == Windows)</dc:creator><description>&lt;p&gt;ASP.NET/ASP.NET AJAX/ASP.NET MVC/jQuery Creating a Simple .NET 4.0 Web App using Visual Studio 2010 ScottGu's May 30 Links: ASP.NET, ASP.NET MVC, Visual Studio Oslo About the &amp;amp;quot;Oslo&amp;amp;quot; May 2009 CTP Channel 9 - Chris Sells: On the History of DevCon,&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9683420</link><pubDate>Tue, 02 Jun 2009 07:03:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9683420</guid><dc:creator>Taz</dc:creator><description>&lt;p&gt;Here is an example of the issue Peter mentioned, I have also run into this with NHibernate.&lt;/p&gt;
&lt;p&gt;class Customer&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public virtual Account Account { get; set; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;...&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;class Account { ... }&lt;/p&gt;
&lt;p&gt;class SavingsAccount : Account { ... }&lt;/p&gt;
&lt;p&gt;class CheckingAccount : Account { ... }&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;if (customer.Account is SavingsAccount)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;// This won't work with defered loading, the proxy will have already subclassed the Account type&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9684336</link><pubDate>Tue, 02 Jun 2009 10:42:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9684336</guid><dc:creator>Marcelo</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you, please, write a complete sample of generic repository and unit of work together, using EF.4.0&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9700932</link><pubDate>Fri, 05 Jun 2009 10:05:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700932</guid><dc:creator>Phillip Smith</dc:creator><description>&lt;p&gt;I too need a complete repository and unit of work example covering all CRUD operations using EF.4.0&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9707915</link><pubDate>Mon, 08 Jun 2009 14:09:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9707915</guid><dc:creator>Phillip Smith</dc:creator><description>&lt;p&gt;Can you map enumerated properties to string fields in the EF model?&lt;/p&gt;
</description></item><item><title>Daily tech links for .net and related technologies - June 9, 2009</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9714607</link><pubDate>Tue, 09 Jun 2009 13:23:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9714607</guid><dc:creator>Sanjeev Agarwal</dc:creator><description>&lt;p&gt;Daily tech links for .net and related technologies - June 9, 2009 Web Development A view from the cloud&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9715883</link><pubDate>Tue, 09 Jun 2009 15:29:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9715883</guid><dc:creator>chris seed</dc:creator><description>&lt;p&gt;Taz,&lt;/p&gt;
&lt;p&gt;For NHibernate: if your modify your domain model so that each domain entity implements an appropriate interface and then change your if statement to something like &lt;/p&gt;
&lt;p&gt; &amp;nbsp; if (customer.Account is ISavingsAccount)&lt;/p&gt;
&lt;p&gt;then you'll find it works.&lt;/p&gt;
&lt;p&gt;Does a similar approach work for the EF?&lt;/p&gt;
</description></item><item><title>POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9724469</link><pubDate>Wed, 10 Jun 2009 18:43:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9724469</guid><dc:creator>ADO.NET team blog</dc:creator><description>&lt;p&gt;In my last post on POCO , I mentioned the fact that there are two types of change tracking possibilities&lt;/p&gt;
</description></item><item><title>POCO in the Entity Framework : Part 3 – Change Tracking with POCO</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9725846</link><pubDate>Thu, 11 Jun 2009 08:19:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9725846</guid><dc:creator>VS2010学习</dc:creator><description>&lt;p&gt;In my last post on POCO , I mentioned the fact that there are two types of change tracking possibilities&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9726218</link><pubDate>Thu, 11 Jun 2009 11:55:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9726218</guid><dc:creator>Muhammad Mosa</dc:creator><description>&lt;p&gt;Is it possible to use Include method to define preloading with POCO classes?&lt;/p&gt;
</description></item><item><title>Using Repository and Unit of Work patterns with Entity Framework 4.0</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9763351</link><pubDate>Wed, 17 Jun 2009 02:08:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9763351</guid><dc:creator>ADO.NET team blog</dc:creator><description>&lt;p&gt;If you have been watching this blog, you know that I have been discussing the various aspects of POCO&lt;/p&gt;
</description></item><item><title>Using Repository and Unit of Work patterns with Entity Framework 4.0</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9772869</link><pubDate>Thu, 18 Jun 2009 08:16:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9772869</guid><dc:creator>VS2010学习</dc:creator><description>&lt;p&gt;If you have been watching this blog, you know that I have been discussing the various aspects of POCO&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9823057</link><pubDate>Tue, 07 Jul 2009 22:06:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9823057</guid><dc:creator>Nilotpal Das</dc:creator><description>&lt;p&gt;Why is inheritance not allowed with complex types in Entity Framework .Net 4.0? What I would like to know is what is the design intent behind such a constraint?&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9836187</link><pubDate>Fri, 17 Jul 2009 01:20:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9836187</guid><dc:creator>englishnewbie</dc:creator><description>&lt;p&gt;&amp;lt;i&amp;gt;You need to only use CreateObject when dealing with proxy based entities.&amp;lt;/&amp;gt;&lt;/p&gt;
&lt;p&gt;I am not an english speaker, so can you elaborate on this one?&lt;/p&gt;
&lt;p&gt;e.g. when creating new product inside context, say:&lt;/p&gt;
&lt;p&gt;using ctx {&lt;/p&gt;
&lt;p&gt;Product p = new Product () { Name = peugeot, Description = French brand car...};&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;later on I'll save it to DB. When do I need to use createObject instead of newing up an object?&lt;/p&gt;
&lt;p&gt;sorry for my english, but please be more verbose on this. EFv4 looks awesome !!!&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9840046</link><pubDate>Sun, 19 Jul 2009 17:37:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9840046</guid><dc:creator>radyo dinle</dc:creator><description>&lt;p&gt;For all the children (IList) I attach a proxy IList which uses the lazy load pattern to provide deferred loading...&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9864600</link><pubDate>Tue, 11 Aug 2009 19:43:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9864600</guid><dc:creator>Muhammad Mosa</dc:creator><description>&lt;p&gt;Regarding using ObjectContext.CreateObject&amp;lt;T&amp;gt; I noticed that i can get same effect by normal instantiation using new!&lt;/p&gt;
&lt;p&gt;Why should I consider using CreateObject when creating POCO instances that will be used with EF 4?&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9864618</link><pubDate>Tue, 11 Aug 2009 19:54:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9864618</guid><dc:creator>Muhammad Mosa</dc:creator><description>&lt;p&gt;Ok I figured out something, CreateObject must be used with Proxy Enabled classes in instantiation. But Even without using it I was able to use AddObject method. The only difference I noticed is that after saving when modifying the object the entity state doesn't change.&lt;/p&gt;
&lt;p&gt;Any justification and more clarification on this point?&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9889691</link><pubDate>Tue, 01 Sep 2009 08:00:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9889691</guid><dc:creator>matt</dc:creator><description>&lt;p&gt;I am wondering how the &amp;quot;deferred&amp;quot; loading works with WCF-like applications? I probably would not want this enabled for SOA/WCF type applications, correct? &lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9894681</link><pubDate>Sun, 13 Sep 2009 19:39:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9894681</guid><dc:creator>michel</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying this in a WCF context.&lt;/p&gt;
&lt;p&gt;All works fine, but only if the Products list in Category is not virtual?&lt;/p&gt;
&lt;p&gt;Also if I query for all Categories and Include their Products, Products fails to serizalize due to the Category parent property, cyclic problem?&lt;/p&gt;
&lt;p&gt;Am I missing something here?&lt;/p&gt;
&lt;p&gt;kr,&lt;/p&gt;
&lt;p&gt;Michel&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9902809</link><pubDate>Sat, 03 Oct 2009 23:28:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9902809</guid><dc:creator>matt</dc:creator><description>&lt;p&gt;It looks like there is no &amp;quot;silver&amp;quot; bullet to kill the werewolf! ORM? Hmmm, the debate continues. Which one to use, etc.? It really boils down to writing some &amp;quot;data access&amp;quot; code, doesn't it? EF has its place for sure - but not as the &amp;quot;defacto&amp;quot; standard on how to build data-driven applications. &lt;/p&gt;
&lt;p&gt;The mapping is always the issue here. Remember when programmers wrote code instead of using &amp;quot;code generation&amp;quot;. I'm not saying don't use code generation, I use it in every project; the trick is kowing when to use and when not to.&lt;/p&gt;
&lt;p&gt;This post: &lt;a rel="nofollow" target="_new" href="http://ayende.com/Blog/archive/2009/05/29/why-defer-loading-in-entity-framework-isnrsquot-going-to-work.aspx"&gt;http://ayende.com/Blog/archive/2009/05/29/why-defer-loading-in-entity-framework-isnrsquot-going-to-work.aspx&lt;/a&gt; HAS REALLY GOT SOME PEOPLE THINKING. &lt;/p&gt;
&lt;p&gt;Thinking is good!&lt;/p&gt;
</description></item><item><title>re: POCO in the Entity Framework : Part 2 – Complex Types, Deferred Loading and Explicit Loading</title><link>http://blogs.msdn.com/adonet/archive/2009/05/28/poco-in-the-entity-framework-part-2-complex-types-deferred-loading-and-explicit-loading.aspx#9931850</link><pubDate>Thu, 03 Dec 2009 08:12:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9931850</guid><dc:creator>Jujiswa</dc:creator><description>&lt;p&gt;Your Article is based on Beta 1 and is therefore complete outdated. Poco-generation works completely different now. You should not waste peoples time and mark this article with Beta 1.&lt;/p&gt;
</description></item></channel></rss>