<?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 : Auditing</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Auditing</description>
  <pubDate>Tue, 21 Apr 2026 14:10:01 -700</pubDate>
  <lastBuildDate>Mon, 24 May 2010 08:44:34 -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=1824</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>Auditing : I came down to the EntityModel...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=7003#7003</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 24-May-2010 at 8:44am<br /><br />I came down to the EntityModel creation of the AuditValue table. For some reason the table kept being created as a view. It seems that because the table did not have a Key but did have multiple columns that would not all null values that each of those columns became keys when the edmx version was created. <DIV></DIV><DIV>&nbsp;</DIV><DIV>I added the Key to the Id column and all worked out.</DIV>]]>
   </description>
   <pubDate>Mon, 24 May 2010 08:44:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=7003#7003</guid>
  </item> 
  <item>
   <title>Auditing : I posted the wrong code. I have...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6980#6980</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 20-May-2010 at 6:01pm<br /><br />I posted the wrong code. I have just fixed the link.]]>
   </description>
   <pubDate>Thu, 20 May 2010 18:01:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6980#6980</guid>
  </item> 
  <item>
   <title>Auditing : I am attaching my example. It...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6977#6977</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 20-May-2010 at 9:16am<br /><br />I am attaching my example. It is using NWDB with AuditTables, mdf files included, and the project. <a href="http://ws2.orcities.org/CEMS/AuditExample.zip" target="_blank">http://ws2.orcities.org/CEMS/AuditExample.zip</A><DIV></DIV><DIV></DIV>You help is greatly appreciated.]]>
   </description>
   <pubDate>Thu, 20 May 2010 09:16:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6977#6977</guid>
  </item> 
  <item>
   <title>Auditing : Ok. Here is what happens. (Includes...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6976#6976</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 20-May-2010 at 7:51am<br /><br />Ok. Here is what happens. (Includes testing code). Im working on recreating this with the nw database. <DIV>It seems as if the EntityManager in the EntityServerSaveInterceptor is not the same EntityManager attached to the entity being saved.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt">protected</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"> <SPAN style="COLOR: blue">override</SPAN> <SPAN style="COLOR: blue">bool</SPAN> ExecuteSave()<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//Get changes in system to any entity base from AuditEntity</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//Returns the one change needed</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">List</SPAN>&lt;DomainModel.<SPAN style="COLOR: #2b91af">AuditEntity</SPAN>&gt; List = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">List</SPAN>&lt;DomainModel.<SPAN style="COLOR: #2b91af">AuditEntity</SPAN>&gt;();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>List.AddRange(EntityManager.FindEntities&lt;DomainModel.<SPAN style="COLOR: #2b91af">AuditEntity</SPAN>&gt;(IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Modified));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>List.AddRange(EntityManager.FindEntities&lt;DomainModel.<SPAN style="COLOR: #2b91af">AuditEntity</SPAN>&gt;(IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Added));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>List.AddRange(EntityManager.FindEntities&lt;DomainModel.<SPAN style="COLOR: #2b91af">AuditEntity</SPAN>&gt;(IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Deleted));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (DomainModel.<SPAN style="COLOR: #2b91af">AuditEntity</SPAN> anEnt <SPAN style="COLOR: blue">in</SPAN> List)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//Call auditself to create audit trail -&gt; See next method below</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>anEnt.AuditSelf(Principal);<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//Verify that the EntityManager has the newly created AuditValues</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//This returns 1. The original change. Does not include the auditvalue created.</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">List</SPAN>&lt;IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN>&gt;<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>eList = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">List</SPAN>&lt;IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN>&gt;();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>eList.AddRange(EntityManager.FindEntities&lt;DomainModel.<SPAN style="COLOR: #2b91af">AuditEntity</SPAN>&gt;(IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Modified));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>eList.AddRange(EntityManager.FindEntities&lt;DomainModel.<SPAN style="COLOR: #2b91af">AuditEntity</SPAN>&gt;(IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Added));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>eList.AddRange(EntityManager.FindEntities&lt;DomainModel.<SPAN style="COLOR: #2b91af">AuditEntity</SPAN>&gt;(IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Deleted));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN> anEnt <SPAN style="COLOR: blue">in</SPAN> eList)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">object</SPAN> o = anEnt;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> <SPAN style="COLOR: blue">base</SPAN>.ExecuteSave();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}</P><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><DIV></DIV><DIV></DIV><DIV></DIV><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">static</SPAN> <SPAN style="COLOR: #2b91af">AuditValue</SPAN> Create(<o:p></o:p></SPAN></DIV><DIV><DIV><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">AuditArgs</SPAN> pArgs, <SPAN style="COLOR: #2b91af">AuditChangeType</SPAN> pChangeType, <SPAN style="COLOR: #2b91af">AuditConfig</SPAN>.<SPAN style="COLOR: #2b91af">AuditConfigProperty</SPAN> pAuditProperty)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//Check that the passed in EntityManager from the AuditEntity has the changes requested.</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//This does return the one change.</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>System.Collections.Generic.<SPAN style="COLOR: #2b91af">List</SPAN>&lt;IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN>&gt; aList = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">List</SPAN>&lt;IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN>&gt;();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>aList.AddRange(pArgs.AuditableEntity.EntityAspect.EntityManager.FindEntities&lt;IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN>&gt;(IbEm.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Modified));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>aList.AddRange(pArgs.AuditableEntity.EntityAspect.EntityManager.FindEntities&lt;IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN>&gt;(IbEm.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Added));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">AuditValue</SPAN> newAudit = pArgs.AuditableEntity.EntityAspect.EntityManager.CreateEntity&lt;<SPAN style="COLOR: #2b91af">AuditValue</SPAN>&gt;();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Must Generate an Id.</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.EntityAspect&#091;<SPAN style="COLOR: #2b91af">AuditValue</SPAN>.<SPAN style="COLOR: #2b91af">EntityPropertyNames</SPAN>.Id&#093; = GetNextAuditId();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.EntityAspect.AddToManager();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.EntityPropertyId = pAuditProperty.Id;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.EntityPrimaryKey = pArgs.PrimaryKeyString;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.ModTs = pArgs.AuditTs;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.ModUserId = (<SPAN style="COLOR: blue">int</SPAN>)pArgs.UserId;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//Added for Audit tracking</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.Approved = pArgs.IsApproved;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Remember: DataSet's DataColumn name is same as AuditProperty.PropertyName</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> columnName = pAuditProperty.PropertyName;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">switch</SPAN> (pChangeType)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">case</SPAN> <SPAN style="COLOR: #2b91af">AuditChangeType</SPAN>.Added:<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.Operation = <SPAN style="COLOR: #a31515">"A"</SPAN>;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.NewValue = pArgs.AuditableEntity.EntityAspect&#091;columnName&#093;.ToString();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">break</SPAN>;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">case</SPAN> <SPAN style="COLOR: #2b91af">AuditChangeType</SPAN>.Deleted:<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.Operation = <SPAN style="COLOR: #a31515">"D"</SPAN>;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.OldValue = pArgs.AuditableEntity.EntityAspect&#091;columnName, IbEm.<SPAN style="COLOR: #2b91af">EntityVersion</SPAN>.Original&#093;.ToString();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">break</SPAN>;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">case</SPAN> <SPAN style="COLOR: #2b91af">AuditChangeType</SPAN>.Modified:<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.Operation = <SPAN style="COLOR: #a31515">"M"</SPAN>;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.NewValue = pArgs.AuditableEntity.EntityAspect&#091;columnName&#093;.ToString();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>newAudit.OldValue = pArgs.AuditableEntity.EntityAspect&#091;columnName, IbEm.<SPAN style="COLOR: #2b91af">EntityVersion</SPAN>.Original&#093;.ToString();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">break</SPAN>;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">default</SPAN>:<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">throw</SPAN> <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">InvalidOperationException</SPAN>(<SPAN style="COLOR: #a31515">"Unexpected change type creating Audit"</SPAN>);<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//reject new change if submitted change is not approved.</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (!newAudit.Approved &amp;&amp; pChangeType != <SPAN style="COLOR: #2b91af">AuditChangeType</SPAN>.Added)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>pArgs.AuditableEntity.EntityAspect&#091;columnName&#093; = pArgs.AuditableEntity.EntityAspect&#091;columnName, IbEm.<SPAN style="COLOR: #2b91af">EntityVersion</SPAN>.Original&#093;;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//Verify that the one addition has been added to the AuditEntity EntityManager.</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">//Successfully does.</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>aList = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">List</SPAN>&lt;IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN>&gt;();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>aList.AddRange(pArgs.AuditableEntity.EntityAspect.EntityManager.FindEntities&lt;IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN>&gt;(IbEm.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Modified));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>aList.AddRange(pArgs.AuditableEntity.EntityAspect.EntityManager.FindEntities&lt;IdeaBlade.EntityModel.<SPAN style="COLOR: #2b91af">Entity</SPAN>&gt;(IbEm.<SPAN style="COLOR: #2b91af">EntityState</SPAN>.Added));<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">return</SPAN> newAudit;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 10pt" =Ms&#111;normal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><o:p></o:p></SPAN></P></DIV></DIV>]]>
   </description>
   <pubDate>Thu, 20 May 2010 07:51:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6976#6976</guid>
  </item> 
  <item>
   <title>Auditing : Let&amp;#039;s double check a few...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6966#6966</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 19-May-2010 at 6:54pm<br /><br />Let's double check a few things:<DIV>1)&nbsp; You should only be using this.EntityManager (the one provided for you in the EntityServerSaveInterceptor).&nbsp; The DefaultManager is a different instance and shouldn't be used for this.</DIV><DIV>2)&nbsp; You should make any changes or additions before calling base.ExecuteSave(), since that base class call is what will commit the objects to the datastore.</DIV><DIV>3)&nbsp; Before calling base.ExecuteSave(), let's confirm that all the Entities of interest are in a modified or added state.</DIV><DIV>&nbsp;</DIV><DIV>If&nbsp;that doesn't help, post the code for ExecuteSave() and your audit method and we'll have a look.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 19 May 2010 18:54:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6966#6966</guid>
  </item> 
  <item>
   <title>Auditing : I have found what is causing the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6958#6958</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 19-May-2010 at 11:39am<br /><br /><P>I have found what is causing the issue. </P><DIV>In EntityServerSaveInterceptor where I override ExecuteSave. I attempt to create the Audit trail. I use the EntityServerSaveInterceptor.EntityManager to find all modified/added/deleted records. This returns the correct amount. I then walk those entities and call the audit trail method I ported from my classic version.</DIV><DIV>&nbsp;</DIV><DIV></DIV><DIV></DIV>If I walk the creation of the audit trail I see the audit value created. I see it attach to the entitymanager. I verify before leaving the create method that it is added to the entitymanager. When the&nbsp; method returns to EntityServerSaveInterceptor.ExecuteSave the EntityManager says there is only one change, the orginal. I have tried passing in the EntityManager to the auditvalue to make sure it is the right entitymanager. It still only returns the original entity. I have tried verifing that DefaultManager and the EntityServerSaveInterceptor.EntityManager&nbsp;are the same and they are not.<DIV>&nbsp;</DIV><DIV>Please help. I am very stuck until this is resolved.</DIV>]]>
   </description>
   <pubDate>Wed, 19 May 2010 11:39:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6958#6958</guid>
  </item> 
  <item>
   <title>Auditing : I get the following error after...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6954#6954</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 19-May-2010 at 9:59am<br /><br />I get the following error after supplying my audit info.<DIV>&nbsp;</DIV><DIV>Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries.</DIV><DIV>&nbsp;</DIV><DIV>To reproduce.</DIV><DIV>&nbsp;</DIV><DIV>I made a change to an entity (Contact.FirstName) when saving it calls ExecuteSave which&nbsp;then calls&nbsp;my Audit method to create audit trail. This creates an AuditValue with the new info. After the audit values are created it finishes ExecuteSave successfully then throws the above error.</DIV><DIV>&nbsp;</DIV><DIV>Modified Contact.FirstName - Successful</DIV><DIV>AuditValues Created and added to the Manager. - Successful</DIV><DIV>SaveChanges - Error</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 19 May 2010 09:59:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6954#6954</guid>
  </item> 
  <item>
   <title>Auditing : Chuck - Those samples were for...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6947#6947</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 18-May-2010 at 7:07pm<br /><br /><P>Chuck - Those samples were for our DevForce Classic product which does not use the Entity Framework or LINQ, so the code won't run on DevForce 2009/2010.&nbsp; The concepts however, may be worth taking a look at.&nbsp; If you want to see them, someone in support can send them to you if you open a support request and reference this forum thread.</P><DIV>As for your code, that is one way to do it.&nbsp; Another would be to archive (copy/insert) the old version of the object to a history table and&nbsp;record the&nbsp;user and time of the change.&nbsp; Then you can perform structured queries on a user, time window, or get a change history for a particular record.&nbsp; I'm no auditing expert, so someone else might want to chime in about what they have done.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 18 May 2010 19:07:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6947#6947</guid>
  </item> 
  <item>
   <title>Auditing : Some older postings for previous...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6946#6946</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> 1824<br /><strong>Posted:</strong> 18-May-2010 at 5:44pm<br /><br />Some older postings for previous DF versions make reference to Audit examples, specifically <EM>"Abstract Classes" and another called "Keeping an <SPAN =highlight>Audit</SPAN> <SPAN =highlight>Trail</SPAN>"</EM>.&nbsp;&nbsp;I do not see any such examples in my full, paid subscription install.&nbsp; Am I just missing them, or are those examples no longer included with DF 2010?&nbsp; If they are still useful, where can I get them?<DIV>&nbsp;</DIV><DIV>On a related note, I've started to put together some audit logging code, shown below.&nbsp; This will end up server side at some point, and only applied to a subset of my entities that implement an IAuditable interface.</DIV><DIV>&nbsp;</DIV><DIV>Any suggestions or observations?&nbsp;</DIV><DIV>&nbsp;</DIV><DIV></DIV><DIV></DIV><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; COLOR: blue; FONT-SIZE: 9.5pt">static</SPAN><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"> <SPAN style="COLOR: blue">void</SPAN> DefaultEntityManager_Saving(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: #2b91af">EntitySavingEventArgs</SPAN> e)<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt">{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: #2b91af">EntityBase</SPAN> entity <SPAN style="COLOR: blue">in</SPAN> e.Entities)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Build up change description</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: #2b91af">StringBuilder</SPAN> sb = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: #2b91af">StringBuilder</SPAN>();<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: #2b91af">DataEntityProperty</SPAN> ep <SPAN style="COLOR: blue">in</SPAN> entity.EntityAspect.EntityMetadata.DataProperties)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">object</SPAN> currentValue = ep.GetValue(entity, <SPAN style="COLOR: #2b91af">EntityVersion</SPAN>.Current);<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">object</SPAN> originalValue = ep.GetValue(entity, <SPAN style="COLOR: #2b91af">EntityVersion</SPAN>.Original);<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> current = currentValue != <SPAN style="COLOR: blue">null</SPAN> ? currentValue.ToString() : <SPAN style="COLOR: blue">string</SPAN>.Empty;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> original = originalValue != <SPAN style="COLOR: blue">null</SPAN> ? originalValue.ToString() : <SPAN style="COLOR: blue">string</SPAN>.Empty;<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">if</SPAN> (current != original)<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>{<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>sb.AppendFormat(<SPAN style="COLOR: #a31515">"{0}:{1}-&gt;{2}, "</SPAN>, ep.Name, original, current);<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><o:p>&nbsp;</o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue">string</SPAN> diffs = sb.ToString().Substring(0, sb.Length - 2);<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: green">// Log diffs...</SPAN><o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN>}<o:p></o:p></SPAN></P><P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: n&#111;ne" =Ms&#111;normal><SPAN style="FONT-FAMILY: C&#111;nsolas; FONT-SIZE: 9.5pt">}<o:p></o:p></SPAN></P><P style="MARGIN: 0in 0in 10pt" =Ms&#111;normal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P><DIV></DIV><DIV></DIV>]]>
   </description>
   <pubDate>Tue, 18 May 2010 17:44:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6946#6946</guid>
  </item> 
  <item>
   <title>Auditing : I&amp;#039;m not familiar with the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6942#6942</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 18-May-2010 at 4:48pm<br /><br />I'm not familiar with the details of your Audit method, but that seems reasonable.&nbsp; You probably know this already, but for anyone else following the thread, you can both modify entities as well as add additional entities to be saved as part of the transaction.]]>
   </description>
   <pubDate>Tue, 18 May 2010 16:48:59 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6942#6942</guid>
  </item> 
  <item>
   <title>Auditing : I started to implement Auditing...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6940#6940</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 18-May-2010 at 4:00pm<br /><br /><P>I started to implement Auditing in the ExecuteSave. I am calling the EntityManager and getting all changed entities for the AuditEntity type. Then calling the Audit method from there. I wasn't sure if there was a better way to do this.</P>]]>
   </description>
   <pubDate>Tue, 18 May 2010 16:00:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6940#6940</guid>
  </item> 
  <item>
   <title>Auditing : TheEntityServerSaveInterceptor...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6939#6939</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=477" rel="nofollow">ting</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 18-May-2010 at 3:44pm<br /><br /><P>The&nbsp;EntityServerSaveInterceptor is where you accomplish this now.&nbsp; You will probably want to override ExecuteSave(), but here's the full list of overridable methods&nbsp;(this is also in the API reference and release notes):</P><DIV>AuthorizeSave()</DIV><DIV>ClientCanSave()</DIV><DIV>ExecuteSave()</DIV><DIV>OnError()</DIV><DIV>ValidateSave()</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>For completeness, on the query side, we have the EntityServerQueryInterceptor and its corresponding methods:</DIV><DIV>&nbsp;</DIV><DIV>AuthorizeQuery()</DIV><DIV>AuthorizeQueryResult()</DIV><DIV>ClientCanQuery()</DIV><DIV>ExecuteQuery()</DIV><DIV>FilterQuery()</DIV><DIV>OnError()</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 18 May 2010 15:44:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6939#6939</guid>
  </item> 
  <item>
   <title>Auditing : I used Wards example in classic...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6932#6932</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1824<br /><strong>Posted:</strong> 18-May-2010 at 12:04pm<br /><br />I used Wards example in classic to create my Audit history for my entities. Now that I am on this version I am not sure how to implement. There doesn't seem to be a SaveSecurityCheck type method for each entity. From what I have noticed it is global to the server.<DIV>&nbsp;</DIV><DIV>Are there methods in place to do auditing.</DIV><DIV>&nbsp;</DIV><DIV>I ran across&nbsp;&nbsp;<FONT face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>SetValueWithChangeTracking <FONT face=Verdana>but couldn't find any docs yet. A nudge in the right direction would be great. I wouldn't want to recreate the wheel if I didn't have to.</FONT></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Tue, 18 May 2010 12:04:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1824&amp;PID=6932#6932</guid>
  </item> 
 </channel>
</rss>