<?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 : Capturing Changes</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Capturing Changes</description>
  <pubDate>Tue, 16 Jun 2026 10:09:21 -700</pubDate>
  <lastBuildDate>Mon, 25 Apr 2011 12:11:31 -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=2635</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>Capturing Changes :   Much thanks, Silvio. -J </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2635&amp;PID=10529#10529</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1019" rel="nofollow">jipock</a><br /><strong>Subject:</strong> 2635<br /><strong>Posted:</strong> 25-Apr-2011 at 12:11pm<br /><br />Much thanks, Silvio. <div>&nbsp;</div><div>-J</div>]]>
   </description>
   <pubDate>Mon, 25 Apr 2011 12:11:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2635&amp;PID=10529#10529</guid>
  </item> 
  <item>
   <title>Capturing Changes : Hi jipock,   You could check...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2635&amp;PID=10527#10527</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2635<br /><strong>Posted:</strong> 25-Apr-2011 at 11:34am<br /><br />Hi jipock, <DIV>&nbsp;</DIV><DIV>You could check which property was changed in the PropertyChanged event:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; var order = _mgr.Orders.GetFirstOrDefault();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;order.PropertyChanged += (o, e) =&gt; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _propertyChanged = e.PropertyName;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV><DIV>&nbsp;</DIV><DIV>Or you can compare compare the Current and Original property values of an entity to determine what has changed.</DIV><DIV>To get the Current and Original values you can use GetValue():</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var original = order.EntityAspect.GetValue("Freight", EntityVersion.Original);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var current = order.EntityAspect.GetValue("Freight", EntityVersion.Current);</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp; Silvio.</DIV>]]>
   </description>
   <pubDate>Mon, 25 Apr 2011 11:34:45 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2635&amp;PID=10527#10527</guid>
  </item> 
  <item>
   <title>Capturing Changes :   Good Afternoon, I&amp;#039;m looking...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2635&amp;PID=10526#10526</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1019" rel="nofollow">jipock</a><br /><strong>Subject:</strong> 2635<br /><strong>Posted:</strong> 25-Apr-2011 at 9:55am<br /><br />Good Afternoon, <div>&nbsp;</div><div>I'm looking to expand my application to perform some better logging. One thing I've done is implement a Log Writer in the Save Interceptor and this will work fine. </div><div>&nbsp;</div><div>Right now, however, I'm trying to write entity changes to the database&nbsp; (think "User Name / Change Type / Before / After"). The User Name is easy enough, as is the change type (EntityState). But, I'm trying to capture Before and After now. </div><div>&nbsp;</div><div>If I have an entity, say, "Property", that appears in a call to the EntityManager.FindEntities(EntityState.Modified) method, I get a collection of entities back. But, how is the best way to determine if the "Address" field&nbsp;or the "Phone Number" field has been modified? And, if I can determine it, is there a way to get a before and after state? </div><div>&nbsp;</div><div>Looking through the documentation didn't give an answer, and I thought that since DevForce has a "Reject Changes" function on the Entity Manager, it MUST be saved somewhere. </div><div>&nbsp;</div><div>Any help would be appreciated. </div><div>&nbsp;</div><div>-Jason</div>]]>
   </description>
   <pubDate>Mon, 25 Apr 2011 09:55:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2635&amp;PID=10526#10526</guid>
  </item> 
 </channel>
</rss>