<?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>Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx</link><description>One of the limitations of Entity Framework V1 released as part of .NET Framework 3.5 SP1 and Visual Studio 2008 SP1 is lack of support for POCO entity objects. POCO stands for Plain Old CLR Object and refers to an object that does not have any persistence</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>  Persistence Ignorance (POCO) Adapter for Entity Framework V1 : EasyCoded</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8937015</link><pubDate>Tue, 09 Sep 2008 20:01:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8937015</guid><dc:creator>  Persistence Ignorance (POCO) Adapter for Entity Framework V1 : EasyCoded</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.easycoded.com/persistence-ignorance-poco-adapter-for-entity-framework-v1/"&gt;http://www.easycoded.com/persistence-ignorance-poco-adapter-for-entity-framework-v1/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8937088</link><pubDate>Tue, 09 Sep 2008 20:43:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8937088</guid><dc:creator>rogerj</dc:creator><description>&lt;p&gt;Does Astoria consider the POCO Adapter's EFPocoContext a first-class data source, that is, supports IQueryable&amp;lt;T&amp;gt; and induces the Astoria runtime to provide IUpdatable&amp;lt;T&amp;gt;.&lt;/p&gt;
&lt;p&gt;In other words, can it be plugged into an Astoria project without adding a significant amount of code?&lt;/p&gt;
&lt;p&gt;Thanks in advance,&lt;/p&gt;
&lt;p&gt;--rj&lt;/p&gt;
</description></item><item><title>Jarek publishes his excellent Entity Framework POCO Adapter</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8937107</link><pubDate>Tue, 09 Sep 2008 20:50:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8937107</guid><dc:creator>Diego Vega</dc:creator><description>&lt;p&gt;I have been back from vacation for some time but I haven't had time to post anything (i.e. I was on vacation&lt;/p&gt;
</description></item><item><title>Persistence Ignorance (POCO) Adapter for Entity Framework</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8937421</link><pubDate>Tue, 09 Sep 2008 23:50:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8937421</guid><dc:creator>BlogCoward</dc:creator><description>&lt;p&gt;Persistence Ignorance (POCO) Adapter for Entity Framework&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8937913</link><pubDate>Wed, 10 Sep 2008 02:23:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8937913</guid><dc:creator>jkowalski</dc:creator><description>&lt;p&gt;Roger,&lt;/p&gt;
&lt;p&gt;I'll investigate the Astoria question, but since EFPocoAdapter does not implement IUpdatable I don't think it works now.&lt;/p&gt;
&lt;p&gt;Implementation of IUpdatable should be pretty straightforward, though.&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8938360</link><pubDate>Wed, 10 Sep 2008 04:31:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8938360</guid><dc:creator>jkowalski</dc:creator><description>&lt;p&gt;OK. I have played with Astoria and I was able to get a basic service to work. All you have to do is to derive from DataService&amp;lt;adapterContextType&amp;gt;, such as:&lt;/p&gt;
&lt;p&gt;public class NorthwindEFService : DataService&amp;lt;NorthwindEntitiesAdapter&amp;gt;&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;This makes use of the &amp;quot;second face&amp;quot; of the object model, which is the EF-compatible adapter layer. Astoria doesn't have a clue that it is talking to POCO model, but the EF-POCO translation happens under the hood.&lt;/p&gt;
</description></item><item><title>Jarek propose un adapter POCO pour EF</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8939163</link><pubDate>Wed, 10 Sep 2008 09:00:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8939163</guid><dc:creator>Matthieu MEZIL</dc:creator><description>&lt;p&gt;Apr&amp;#232;s avoir propos&amp;#233; une solution pour faire du Lazy Loading avec EF v1, Jarek propose maintenant une&lt;/p&gt;
</description></item><item><title>Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8939289</link><pubDate>Wed, 10 Sep 2008 10:03:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8939289</guid><dc:creator>DotNetKicks.com</dc:creator><description>&lt;p&gt;You've been kicked (a good thing) - Trackback from DotNetKicks.com&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8940351</link><pubDate>Wed, 10 Sep 2008 15:58:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8940351</guid><dc:creator>Damon Wilder Carr</dc:creator><description>&lt;p&gt;Nice.. We are finishing the same style of work that we have a large regression base for Linq to NHibernate, Linq to SQL and Linq to EF all via the same type of solution you've done here it appears.&lt;/p&gt;
&lt;p&gt;Our design goal is to allow not only persistence ignorance for entities but also to allow transport ignorance for repository services. The two main scenarios we are testing is in-proc and WCF. &lt;/p&gt;
&lt;p&gt;It does get interesting with serialization as moving say an NHibernate set over WCF to a presenter/controller and even using a cool TypeDescriptor technique we use for 'flattening' a one-many result into a grid (using ITypedList as a key piece) for 2-way data binding and then moving it back for updates is non-trivial and we're still deciding just how much we want to get involved with writing yet another sync solution for updates (we do not want to of course)...&lt;/p&gt;
&lt;p&gt;Anyway, nice work again.&lt;/p&gt;
&lt;p&gt;Damon &lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8940900</link><pubDate>Wed, 10 Sep 2008 18:37:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8940900</guid><dc:creator>rogerj</dc:creator><description>&lt;p&gt;Jarek,&lt;/p&gt;
&lt;p&gt;Thanks for the Astoria test. I'll give it a try later this week or weekend.&lt;/p&gt;
&lt;p&gt;--rj&lt;/p&gt;
</description></item><item><title>Le POCO enfin disponible sur l'Entity Framework</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8941171</link><pubDate>Wed, 10 Sep 2008 19:50:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8941171</guid><dc:creator>WithArt Blog</dc:creator><description>&lt;p&gt;Le POCO enfin disponible sur l'Entity Framework&lt;/p&gt;
</description></item><item><title>Entity Framework enfin compatible POCO</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8941561</link><pubDate>Wed, 10 Sep 2008 21:32:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8941561</guid><dc:creator>WithArt Blog</dc:creator><description>&lt;p&gt;Entity Framework enfin compatible POCO&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8941971</link><pubDate>Wed, 10 Sep 2008 23:47:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8941971</guid><dc:creator>jkowalski</dc:creator><description>&lt;p&gt;I've published a minor update (v1.01) to Code Gallery that fixes a problem where you cannot generate an adapter when you don't pass /ref: parameter and your model contains a collection.&lt;/p&gt;
&lt;p&gt;Also, added caching of RelatedEnds in the generated code which will provide much faster DetectChanges() by eliminating metadata lookups.&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8949435</link><pubDate>Sat, 13 Sep 2008 10:52:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8949435</guid><dc:creator>CoreyGaudin</dc:creator><description>&lt;p&gt;I noticed a problem on File EFPocoContext.cs Line 165:&lt;/p&gt;
&lt;p&gt;You need to change that line to the following 2 lines (on grabbing the AdapterCreators cached on the function GetAdapterObject):&lt;/p&gt;
&lt;p&gt;Type entityType = (entity is IEntityProxy ? entity.GetType().BaseType : entity.GetType());&lt;/p&gt;
&lt;p&gt;Func&amp;lt;object, IPocoAdapter&amp;gt; adapterCreator = _queryTranslationCache.AdapterCreators[entityType];&lt;/p&gt;
&lt;p&gt;The cache of Adapter Creators does not create an equivalent for the Proxies. So if you use a proxy to change one of its references, it will bomb with no key found. This change will see if it is a proxy, and get its base which will always be the model object (instead of creating n x 2 cache items - so that should be a faster way to tackle it).&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8950188</link><pubDate>Sat, 13 Sep 2008 17:51:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8950188</guid><dc:creator>jkowalski</dc:creator><description>&lt;p&gt;CoreyGaudin:&lt;/p&gt;
&lt;p&gt;I was able to reproduce the bug with the following simple test, which is failing on v1.01:&lt;/p&gt;
&lt;p&gt;[TestMethod]&lt;/p&gt;
&lt;p&gt;public void GetAdapterObjectDoesNotWorkForProxiesBug()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;using (NorthwindEntities context = new NorthwindEntities())&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var customerProxy = context.CreateObject&amp;lt;Customer&amp;gt;();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assert.IsTrue(context.IsProxy(customerProxy));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var adapterObject = context.GetAdapterObject(customerProxy);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Assert.AreSame(customerProxy, adapterObject.PocoEntity);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Is this your scenario?&lt;/p&gt;
&lt;p&gt;I have a fix for it (different than you suggested - I'm basically making sure that the situation where you have a proxy, but its adapter is not cached is not possible). &lt;/p&gt;
&lt;p&gt;I will add a bunch of asserts and tests to verify this, would you be interested in verifying the fix with your application before I make it public? If so, please drop me a line at jaroslaw dot kowalski at microsoft dot com.&lt;/p&gt;
</description></item><item><title>Create a proxy object doesnt work correctly.</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8950950</link><pubDate>Sat, 13 Sep 2008 23:44:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8950950</guid><dc:creator>CoreyGaudin</dc:creator><description>&lt;p&gt;Your create proxy object doesnt work correctly if that object has a reference objects and entities.&lt;/p&gt;
&lt;p&gt;In the example you used above: &lt;/p&gt;
&lt;p&gt;context.CreateObject&amp;lt;Customer&amp;gt;();&lt;/p&gt;
&lt;p&gt;If customer had a related object Orders, then if you try to set that to a new Order for that customer, the Order throws an error, because it cant find a order (even though its a new customer and shouldnt have an order).&lt;/p&gt;
&lt;p&gt;Is there any way around this? I want a Proxy object so I can manipulate it and in the end save it without doing a massive attach at the end which would be expensive.&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#8951337</link><pubDate>Sun, 14 Sep 2008 03:06:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8951337</guid><dc:creator>jkowalski</dc:creator><description>&lt;p&gt;Both issues reported by Corey have been resolved in a new release of EFPocoAdapter v1.02:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/jkowalski/archive/2008/09/13/ef-poco-adapter-updated-v1-02.aspx"&gt;http://blogs.msdn.com/jkowalski/archive/2008/09/13/ef-poco-adapter-updated-v1-02.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Mehr POCO (Plain Old CLR Objects) UND Entity Framework - Der "Persistence Ignorance (POCO) Adapter for Entity FRAMEWORK V1" ...</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#9014529</link><pubDate>Fri, 24 Oct 2008 13:58:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9014529</guid><dc:creator>Mostly Technical Content</dc:creator><description>&lt;p&gt;In diesem Blogs habe ich schon 2-mal &amp;amp;#252;ber die Themen Entity Framework und POCO geschrieben. Aus&lt;/p&gt;
</description></item><item><title>Entities as interfaces vs. Linq to Entities revisited and lost</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#9340548</link><pubDate>Mon, 19 Jan 2009 22:06:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9340548</guid><dc:creator>Lars-Erik's blog</dc:creator><description>&lt;p&gt;I&amp;amp;#39;m following up on that case here, still clinging to some hope: &lt;a rel="nofollow" target="_new" href="http://forums.microsoft.com/MSDN"&gt;http://forums.microsoft.com/MSDN&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>#.think.in infoDose #19 (23rd Feb - 27th Feb)</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#9453390</link><pubDate>Mon, 02 Mar 2009 05:07:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9453390</guid><dc:creator>#.think.in</dc:creator><description>&lt;p&gt;#.think.in infoDose #19 (23rd Feb - 27th Feb)&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#9462861</link><pubDate>Fri, 06 Mar 2009 18:26:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9462861</guid><dc:creator>Tanveer Badar</dc:creator><description>&lt;p&gt;It is great work Jaroslaw. I appreciate if from the depths of my heart.&lt;/p&gt;
&lt;p&gt;But if everyone is trying to improve EF v1 in some way, adding obvious features like proper change tracking, PI etc. doesn't it say a lot about how half-baked solution EF is?&lt;/p&gt;
&lt;p&gt;Most of these problems will still remain in v2, why should anyone use EF when there are better, more complete ORM solutions out there.&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#9462969</link><pubDate>Fri, 06 Mar 2009 19:14:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9462969</guid><dc:creator>jkowalski</dc:creator><description>&lt;p&gt;Lack of POCO support was probably the biggest pain point of the first release of Entity Framework. &lt;/p&gt;
&lt;p&gt;Let me assure you that we are addressing that problem in the next version by supporting pure POCO objects. We are also making big investments in other areas, such as N-tier support, lazy loading and many others which will greatly improve developer experience. EF Design Blog (&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/efdesign"&gt;http://blogs.msdn.com/efdesign&lt;/a&gt;) has lots of information about new features coming in EF v4.0 and many more exciting posts will be published there.&lt;/p&gt;
</description></item><item><title>re: Persistence Ignorance (POCO) Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#9554338</link><pubDate>Fri, 17 Apr 2009 18:24:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9554338</guid><dc:creator>Courtois</dc:creator><description>&lt;p&gt;Nice job !&lt;/p&gt;
&lt;p&gt; but i have a quesstion how can i execute &amp;quot;import function&amp;quot; via the adapter ?&lt;/p&gt;
&lt;p&gt;I would like something like that:&lt;/p&gt;
&lt;p&gt; IList&amp;lt;T&amp;gt; ExecuteFunction&amp;lt;T&amp;gt;(&amp;quot;MyFunction&amp;quot;, myObjectParameter)&lt;/p&gt;
</description></item><item><title>What is POCO - Entity Framework</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#9608707</link><pubDate>Wed, 13 May 2009 04:57:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9608707</guid><dc:creator>Sriram's WebLog on ASP.NET VB.NET C#</dc:creator><description>&lt;p&gt;Ever wondered about what is POCO? POCO stands for Plain Old CLR Object which does not have any persistence&lt;/p&gt;
</description></item><item><title>Problem with POCO Adapter for Entity Framework V1</title><link>http://blogs.msdn.com/jkowalski/archive/2008/09/09/persistence-ignorance-poco-adapter-for-entity-framework-v1.aspx#9777851</link><pubDate>Fri, 19 Jun 2009 02:09:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9777851</guid><dc:creator>gutemberg.ribeiro</dc:creator><description>&lt;p&gt;Hi Joraslaw!&lt;/p&gt;
&lt;p&gt;Thanks for the great post about this great EF v1 extension.&lt;/p&gt;
&lt;p&gt;So, I had some problems with it and posted into discussion list of MSDN Code portal.&lt;/p&gt;
&lt;p&gt;Above the link direct for the discussion I really appreciate if you can take a look and see if u can help me.&lt;/p&gt;
&lt;p&gt;Best regards...&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://code.msdn.microsoft.com/EFPocoAdapter/Thread/View.aspx?ThreadId=1893"&gt;http://code.msdn.microsoft.com/EFPocoAdapter/Thread/View.aspx?ThreadId=1893&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Gutemberg Ribeiro&lt;/p&gt;
</description></item></channel></rss>