<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Property Changed on Detached Entities</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Property Changed on Detached Entities</description>
  <pubDate>Thu, 16 Apr 2026 20:56:59 -700</pubDate>
  <lastBuildDate>Mon, 20 Jun 2011 16:51:48 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2674</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Property Changed on Detached Entities : As an update to anybody else that...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2674&amp;PID=11043#11043</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=613" rel="nofollow">stephenmcd1</a><br /><strong>Subject:</strong> 2674<br /><strong>Posted:</strong> 20-Jun-2011 at 4:51pm<br /><br />As an update to anybody else that might stumble across this topic, the issue I described above has been fixed as of 6.1.1.0.<div><br></div><div>Thanks IdeaBlade!</div><div><br></div><div>-Stephen</div>]]>
   </description>
   <pubDate>Mon, 20 Jun 2011 16:51:48 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2674&amp;PID=11043#11043</guid>
  </item> 
  <item>
   <title>Property Changed on Detached Entities : I have some entities that I often...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2674&amp;PID=10665#10665</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=613" rel="nofollow">stephenmcd1</a><br /><strong>Subject:</strong> 2674<br /><strong>Posted:</strong> 12-May-2011 at 1:50pm<br /><br /><div>I have some entities that I often use without being associated with an Entity Manager (that is, they are detached). &nbsp;So far, I haven't run into any major issues except for one. &nbsp;If an exception is thrown by somebody watching the PropertyChanged event, Dev Force tries to do special logic. &nbsp;It looks to see if the entity is being loaded. &nbsp;But in my case, that check fails because the entity is not in an entity manger. &nbsp;And unfortunately, that means that I get a very unhelpful "NullReferenceException" and my original exception gets swallowed. &nbsp;The problem code that I'm running into is in EntityWrapper and looks something like this:</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode">&nbsp; &nbsp;protected internal virtual void OnPropertyChanged(PropertyChangedEventArgs e)</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; if (this.PropertyChanged != null)</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; try</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.PropertyChanged.Invoke(this, e);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; catch</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!this.EntityManager.IsLoadingEntity)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; throw;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; }</pre></td></tr></table></div><div><br></div><div>It seems like if the condition was changed to 'if (this.EntityManager == null || !this.EntityManager.IsLoadingEntity)', then it would behave fine for detached entities. &nbsp;I know this might be a weird use case, but I'm hoping it would be a pretty simple and low-risk change.</div><div><br></div><div>Thanks,</div><div>-Stephen</div>]]>
   </description>
   <pubDate>Thu, 12 May 2011 13:50:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2674&amp;PID=10665#10665</guid>
  </item> 
 </channel>
</rss>