<?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 : Find all &quot;hard&quot; properties on entity</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : Find all &quot;hard&quot; properties on entity</description>
  <pubDate>Wed, 15 Apr 2026 12:00:30 -700</pubDate>
  <lastBuildDate>Wed, 20 Nov 2013 10:17:29 -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=4606</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>Find all &quot;hard&quot; properties on entity : Thank you, this worked! </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4606&amp;PID=17249#17249</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1264" rel="nofollow">katit</a><br /><strong>Subject:</strong> 4606<br /><strong>Posted:</strong> 20-Nov-2013 at 10:17am<br /><br />Thank you, this worked!]]>
   </description>
   <pubDate>Wed, 20 Nov 2013 10:17:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4606&amp;PID=17249#17249</guid>
  </item> 
  <item>
   <title>Find all &quot;hard&quot; properties on entity : You can use the metadata DevForce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4606&amp;PID=17248#17248</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 4606<br /><strong>Posted:</strong> 20-Nov-2013 at 9:58am<br /><br />You can use the metadata DevForce holds for the entity and its properties.&nbsp; Something like this: <DIV>&nbsp;</DIV><DIV>var metadata = entityManager.MetadataStore.GetEntityMetadata(modifiedEntity.GetType());<BR>foreach (var p in metadata.DataProperties) {<BR>&nbsp; var oldValue = p.GetValue(modifiedEntity, EntityVersion.Original);<BR>&nbsp; var newValue = p.GetValue(modifiedEntity, EntityVersion.Current);<BR>}</DIV><DIV>&nbsp;</DIV><DIV>The DataProperties collection contains only data (non-navigation) properties.&nbsp; The EntityMetadata also contains other information you might find useful - <a href="http://drc.ideablade.com/devforce-2012/bin/view/&#068;ocumentati&#111;n/model-examine" target="_blank">http://drc.ideablade.com/devforce-2012/bin/view/Documentation/model-examine</A>.</DIV>]]>
   </description>
   <pubDate>Wed, 20 Nov 2013 09:58:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4606&amp;PID=17248#17248</guid>
  </item> 
  <item>
   <title>Find all &quot;hard&quot; properties on entity : I need to filter out entity properties...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4606&amp;PID=17247#17247</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1264" rel="nofollow">katit</a><br /><strong>Subject:</strong> 4606<br /><strong>Posted:</strong> 20-Nov-2013 at 8:01am<br /><br />I need to filter out entity properties to avoid navigation properties.<br /><br />I'm writing audit code, which should store all changes and currently it fails on getting "Original" value of navigation property. I need to collect all properties even keys for navigation properties. How do I filter this list?<br /><br />foreach (var property in modifiedEntity.GetType().GetProperties())<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var oldValue = modifiedEntity.EntityAspect.GetValue(property.Name, EntityVersion.Original).ToString();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var newValue = modifiedEntity.EntityAspect.GetValue(property.Name, EntityVersion.Current).ToString();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (oldValue.Equals(newValue)) continue;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auditEntry.SYSAuditDetails.Add(new SYSAuditDetail<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SYSAudit = auditEntry,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FieldName = property.Name,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OldValue = oldValue,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NewValue = newValue<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  }]]>
   </description>
   <pubDate>Wed, 20 Nov 2013 08:01:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4606&amp;PID=17247#17247</guid>
  </item> 
 </channel>
</rss>