<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Viewing Generated Proxy Code in the Entity Framework</title>
	<atom:link href="http://davedewinter.com/2010/04/08/viewing-generated-proxy-code-in-the-entity-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://davedewinter.com/2010/04/08/viewing-generated-proxy-code-in-the-entity-framework/</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 22 Sep 2011 22:12:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: David DeWinter</title>
		<link>http://davedewinter.com/2010/04/08/viewing-generated-proxy-code-in-the-entity-framework/#comment-198</link>
		<dc:creator>David DeWinter</dc:creator>
		<pubDate>Sun, 21 Nov 2010 19:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.rev-net.com/ddewinter/?p=304#comment-198</guid>
		<description>Hi Peter, sorry for the delay in replying. The underlying problem is that there is no way for the EF to know there is new data in the database unless you tell it (e.g. with OverwriteChanges). It&#039;s an interesting situation that you bring up because I can see advantages to both sides. On the one hand, you could expect that reloading an object with MergeOption.OverwriteChanges would cause navigation properties to be invalidated and thus lazy loading would trigger a new query against the database, even if the navigation property was already loaded. On the other hand, this behavior could be surprising because you are only loading the object with MergeOption.OverwriteChanges and not the association.

You do have a way to do explicit loading of associations with MergeOption.OverwriteChanges (by using ObjectContext.LoadProperty). But I don&#039;t think there is a way to tell lazy loading what MergeOption to use at this time.</description>
		<content:encoded><![CDATA[<p>Hi Peter, sorry for the delay in replying. The underlying problem is that there is no way for the EF to know there is new data in the database unless you tell it (e.g. with OverwriteChanges). It&#8217;s an interesting situation that you bring up because I can see advantages to both sides. On the one hand, you could expect that reloading an object with MergeOption.OverwriteChanges would cause navigation properties to be invalidated and thus lazy loading would trigger a new query against the database, even if the navigation property was already loaded. On the other hand, this behavior could be surprising because you are only loading the object with MergeOption.OverwriteChanges and not the association.</p>
<p>You do have a way to do explicit loading of associations with MergeOption.OverwriteChanges (by using ObjectContext.LoadProperty). But I don&#8217;t think there is a way to tell lazy loading what MergeOption to use at this time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterno</title>
		<link>http://davedewinter.com/2010/04/08/viewing-generated-proxy-code-in-the-entity-framework/#comment-197</link>
		<dc:creator>peterno</dc:creator>
		<pubDate>Mon, 06 Sep 2010 13:02:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.rev-net.com/ddewinter/?p=304#comment-197</guid>
		<description>Hi, we have problems that our navigation propterties are not not reloaded even if we have set MergeOption.OverwriteChanges on the ObjectSet. The fist time we fetch a entity and then access its navigation propterties we get the data (and we can see this in EFProf). I we then make changes to the database and fetch the the entity again we see that the actual entity is fetched from the database with its new data. But when we access the entity&#039;s navigation property the already loaded data is returned and not the updated data in the database.
You state above that &quot;we will load the navigation property into memory if it’s not there already.&quot; How does it handle the case that the data is memory but the data in the database is updated and thereby the data should be fetched again into memory?

BR,

/Peter</description>
		<content:encoded><![CDATA[<p>Hi, we have problems that our navigation propterties are not not reloaded even if we have set MergeOption.OverwriteChanges on the ObjectSet. The fist time we fetch a entity and then access its navigation propterties we get the data (and we can see this in EFProf). I we then make changes to the database and fetch the the entity again we see that the actual entity is fetched from the database with its new data. But when we access the entity&#8217;s navigation property the already loaded data is returned and not the updated data in the database.<br />
You state above that &#8220;we will load the navigation property into memory if it’s not there already.&#8221; How does it handle the case that the data is memory but the data in the database is updated and thereby the data should be fetched again into memory?</p>
<p>BR,</p>
<p>/Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David DeWinter</title>
		<link>http://davedewinter.com/2010/04/08/viewing-generated-proxy-code-in-the-entity-framework/#comment-196</link>
		<dc:creator>David DeWinter</dc:creator>
		<pubDate>Sat, 03 Jul 2010 01:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.rev-net.com/ddewinter/?p=304#comment-196</guid>
		<description>Dinesh, did you use the first code snippet to set the AssemblyBuilderAccess to AssemblyBuilderAccess.RunAndSave instead of AssemblyBuilderAccess.Run?</description>
		<content:encoded><![CDATA[<p>Dinesh, did you use the first code snippet to set the AssemblyBuilderAccess to AssemblyBuilderAccess.RunAndSave instead of AssemblyBuilderAccess.Run?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinesh</title>
		<link>http://davedewinter.com/2010/04/08/viewing-generated-proxy-code-in-the-entity-framework/#comment-195</link>
		<dc:creator>Dinesh</dc:creator>
		<pubDate>Tue, 15 Jun 2010 23:02:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.rev-net.com/ddewinter/?p=304#comment-195</guid>
		<description>Hi, I tried this solution (took the code from here pretty much as is) but keep getting an InvalidOperationException with the message &quot;Cannot save a transient assembly&quot; on the pocoProxyAssembly.Save(...) line. I am running it through a Visual Studio Unit Test though.</description>
		<content:encoded><![CDATA[<p>Hi, I tried this solution (took the code from here pretty much as is) but keep getting an InvalidOperationException with the message &#8220;Cannot save a transient assembly&#8221; on the pocoProxyAssembly.Save(&#8230;) line. I am running it through a Visual Studio Unit Test though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: marius</title>
		<link>http://davedewinter.com/2010/04/08/viewing-generated-proxy-code-in-the-entity-framework/#comment-194</link>
		<dc:creator>marius</dc:creator>
		<pubDate>Mon, 24 May 2010 15:29:32 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.rev-net.com/ddewinter/?p=304#comment-194</guid>
		<description>Thx!Thx!Thx!</description>
		<content:encoded><![CDATA[<p>Thx!Thx!Thx!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad Mosa</title>
		<link>http://davedewinter.com/2010/04/08/viewing-generated-proxy-code-in-the-entity-framework/#comment-193</link>
		<dc:creator>Muhammad Mosa</dc:creator>
		<pubDate>Fri, 09 Apr 2010 10:04:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.rev-net.com/ddewinter/?p=304#comment-193</guid>
		<description>What a valuable post! Thank you for taking the time to explain this subject. And to show in practical and give us the chance to dig inside.
Very cool. Thank you again.</description>
		<content:encoded><![CDATA[<p>What a valuable post! Thank you for taking the time to explain this subject. And to show in practical and give us the chance to dig inside.<br />
Very cool. Thank you again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

