<?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 : Detecting changes to a new Entity</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Detecting changes to a new Entity</description>
  <pubDate>Mon, 13 Apr 2026 16:58:23 -700</pubDate>
  <lastBuildDate>Thu, 04 Mar 2010 12:23:09 -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=1663</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>Detecting changes to a new Entity : Thanks for the reply, David.  So,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1663&amp;PID=6288#6288</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=705" rel="nofollow">chuckc</a><br /><strong>Subject:</strong> 1663<br /><strong>Posted:</strong> 04-Mar-2010 at 12:23pm<br /><br />Thanks for the reply, David.<br /><br />So, it sounds like the EntityAspect property of a DevForce entity just  returns the underlying EntityFramework entity.<br /><br />That seems to imply that the upcoming April version of DevForce that supports Entity Frameworks 4.0 will have the improved self-tracking features that are supposed to be coming in EF4, as discussed here:<br /><br />http://www.develop.com/entityframework4<br /><br />Can I get a beta copy of DevForce for EF4?]]>
   </description>
   <pubDate>Thu, 04 Mar 2010 12:23:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1663&amp;PID=6288#6288</guid>
  </item> 
  <item>
   <title>Detecting changes to a new Entity : EntityAspect.HasChanges() is currently...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1663&amp;PID=6287#6287</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 1663<br /><strong>Posted:</strong> 04-Mar-2010 at 10:43am<br /><br /><P>EntityAspect.HasChanges() is currently working as designed.</P><DIV></DIV><DIV></DIV><DIV>If you want different semantics, you will have to handle it yourself.&nbsp; For example, if you want to know if an entity has changed since it was initially created, you could add an additional property to the entity such as ChangedAfterCreated.&nbsp; You would first set the value of this property to false when you created the entity.&nbsp; You could then add a PropertyChanged event handler to&nbsp;handle the ChangedAfterCreated property.</DIV>]]>
   </description>
   <pubDate>Thu, 04 Mar 2010 10:43:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1663&amp;PID=6287#6287</guid>
  </item> 
  <item>
   <title>Detecting changes to a new Entity : Hopefully this is a simple question...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1663&amp;PID=6271#6271</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=705" rel="nofollow">chuckc</a><br /><strong>Subject:</strong> 1663<br /><strong>Posted:</strong> 27-Feb-2010 at 4:39pm<br /><br />Hopefully this is a simple question to answer.  <br /><br />When creating a new object/Entity, how does one skip attempting to save it if it has not been modified?  I'm trying to add some logic into a Saving event handler, but EnityAspect.HasChanges() seems to always return true as soon as an object has been created, even before any properties have been modified.&nbsp;&nbsp;&nbsp;AcceptChanges() and RejectChanges() seem to have no effect.<br /><br />Employee e = _manager.CreateEntity&lt;Employee&gt;();  <br />// e.EntityAspect.HasChanges() == true<br /><br />e.EntityAspect.AcceptChanges();<br />// e.EntityAspect.HasChanges() == true<br /><br />e.EntityAspect.RejectChanges();<br />// e.EntityAspect.HasChanges() == true<br /><br />The above code behaves the same even when the Employee is created with a simple constructor, e.g. Employee e = new Employee();<br /><br />Is there some other technique that you recommend?<br /><br />Thanks.]]>
   </description>
   <pubDate>Sat, 27 Feb 2010 16:39:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1663&amp;PID=6271#6271</guid>
  </item> 
 </channel>
</rss>