<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Entity Framework on Andrew Walsh</title><link>http://awalsh128.com/tags/entity-framework/</link><description>Recent content in Entity Framework on Andrew Walsh</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>© 2026 Andrew Walsh</copyright><lastBuildDate>Wed, 03 Oct 2012 13:44:50 -0700</lastBuildDate><atom:link href="http://awalsh128.com/tags/entity-framework/feed.xml" rel="self" type="application/rss+xml"/><item><title>POCO not transforming into a POCO proxy.</title><link>http://awalsh128.com/poco-not-transforming-into-poco-proxy/</link><pubDate>Mon, 07 Nov 2011 00:00:00 -0800</pubDate><guid>http://awalsh128.com/poco-not-transforming-into-poco-proxy/</guid><description>&lt;p&gt;A POCO (Plain Old CLR Object) must be transformed into a POCO proxy&lt;br&gt;&#10;[MyNamespace.MyClass&#10;-&amp;gt;{System.Data.Entity.DynamicProxies.MyClass_0A943C2FC37D33304CEB497A9210C754E3F553B50315F8E6F0F7A6FAF43777F2}]{.Apple-style-span&#10;style=&amp;ldquo;font-size: x-small;&amp;rdquo;})&lt;br&gt;&#10;in order for features like lazy loading and change tracking to work.&lt;br&gt;&#10;&lt;br&gt;&#10;&lt;a href="http://msdn.microsoft.com/en-us/library/dd468057.aspx" target="_blank" rel="noreferrer"&gt;MSDN has a great&#10;article&lt;/a&gt; that&#10;explains how to prepare a POCO to be transformed into a proxy. If you&#10;find that an object retrieved or attached to the context does not show&#10;itself in the DynamicProxies namespace (eg. MyNamespace.MyClass instead&#10;of ...DynamicProxies.MyClass), then you probably don't have a&#10;compliant class. You may have noticed this already when hovering your&#10;mouse cursor over an instance and seeing the runtime information on it.&lt;br&gt;&#10;&lt;br&gt;&#10;The distilled points are that your POCO must:&lt;/p&gt;</description></item><item><title>Entity Framework June 2011 CTP Bug</title><link>http://awalsh128.com/entity-framework-june-2011-ctp-bug/</link><pubDate>Sat, 08 Oct 2011 00:00:00 -0700</pubDate><guid>http://awalsh128.com/entity-framework-june-2011-ctp-bug/</guid><description>&lt;p&gt;I recently installed the Entity Framework June 2011 CTP to preview the&#10;enum support but ran into a bug along the way that reported an error&#10;while processing the template.&lt;br&gt;&#10;\&lt;/p&gt;</description></item><item><title>EF 4.1 Code First: Many one-to-one properties for same class type on an object.</title><link>http://awalsh128.com/ef-41-code-first-many-one-to-one/</link><pubDate>Wed, 05 Oct 2011 00:00:00 -0700</pubDate><guid>http://awalsh128.com/ef-41-code-first-many-one-to-one/</guid><description>&lt;p&gt;I just started using the Entity Framework recently to employ persistence&#10;for an already established code base. Initially I was using the &amp;quot;Model&#10;&amp;amp; Database First&amp;quot; paradigm where a designer is used to layout the data&#10;model. Although, this ended up being tedious since my&#10;&lt;a href="http://en.wikipedia.org/wiki/Plain_Old_CLR_Object" target="_blank" rel="noreferrer"&gt;POCO&lt;/a&gt; instance had&#10;to exactly match the &lt;a href="http://msdn.microsoft.com/en-us/library/dd456853.aspx" target="_blank" rel="noreferrer"&gt;POCO&#10;proxy&lt;/a&gt; instance&#10;in my model designer view. After upgrading to EF 4.1, I realized the&#10;&lt;a href="http://blogs.msdn.com/b/adonet/archive/2011/09/13/ef-code-first-fluent-api-with-vb-net.aspx" target="_blank" rel="noreferrer"&gt;&amp;quot;Code First&amp;quot;&#10;paradigm&lt;/a&gt;&#10;was the way to go since I had to adapt the persistence model to my&#10;already existing code.&lt;br&gt;&#10;&lt;br&gt;&#10;One of the earliest problems that I ran into was having more than one&#10;property on a class that referenced the same class type. This example&#10;was taken from &lt;a href="http://weblogs.asp.net/manavi/archive/2011/03/28/associations-in-ef-4-1-code-first-part-2-complex-types.aspx" target="_blank" rel="noreferrer"&gt;a great&#10;site&lt;/a&gt;&#10;that explored the different EF properties.&lt;br&gt;&#10;[]{.Apple-style-span&#10;style=&amp;ldquo;background-color: #f8f8f8; color: #2e2e2e; font-family: &amp;lsquo;Courier New&amp;rsquo;, Courier, mono; font-size: 12px;&amp;rdquo;}\&lt;/p&gt;</description></item></channel></rss>