<?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 : Metadata</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Metadata</description>
  <pubDate>Sat, 11 Apr 2026 17:54:19 -700</pubDate>
  <lastBuildDate>Fri, 01 Oct 2010 12:48:56 -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=2206</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>Metadata : Hi danjal;I would like to add...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2206&amp;PID=8690#8690</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2206<br /><strong>Posted:</strong> 01-Oct-2010 at 12:48pm<br /><br />Hi danjal;<div><br></div><div>I would like to add that there is also a much easier way to access the DisplayName attribute.</div><div><br></div><div><p ="Ms&#111;normal"><span style="font-size:10.0pt;font-family:C&#111;nsolas;  color:blue">var</span><span style="font-size:10.0pt;font-family:C&#111;nsolas">&nbsp;displayName&nbsp;=&nbsp;<span style="color:#2B91AF">Customer</span>.<span style="color:#2B91AF">PropertyMetadata</span>.Phone.MemberMetadata.DisplayName;<o:p></o:p></span></p><p ="Ms&#111;normal"><br></p><p ="Ms&#111;normal">The PropertyMetadata and the MemberMetadata class contain many of relatively easily accessible metadata about the properties of an entity.</p></div>]]>
   </description>
   <pubDate>Fri, 01 Oct 2010 12:48:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2206&amp;PID=8690#8690</guid>
  </item> 
  <item>
   <title>Metadata : Hi danjal;The simplest way to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2206&amp;PID=8687#8687</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2206<br /><strong>Posted:</strong> 01-Oct-2010 at 10:52am<br /><br />Hi danjal;<div><br></div><div>The simplest way to change the DisplayName attribute is through the .edmx file.</div><div><br></div><div>To retrieve it, you can use the following code:</div><div><br></div><div>var displayName = GetDisplayNameAttribute(typeof(Customer), Customer.PropertyMetadata.Phone.Name);</div><div><br></div><div><div>public String GetDisplayNameAttribute(Type entityType, String propertyName) {</div><div>&nbsp;&nbsp; &nbsp; &nbsp;var propertyInfo = entityType.GetProperty(propertyName);</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;var attributes = (DisplayAttribute)propertyInfo.GetCustomAttributes(typeof(DisplayAttribute), false).First();</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;return attributes.Name;</div><div>&nbsp;&nbsp; &nbsp;}</div></div><div><br></div><div>Hope this helps.</div>]]>
   </description>
   <pubDate>Fri, 01 Oct 2010 10:52:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2206&amp;PID=8687#8687</guid>
  </item> 
  <item>
   <title>Metadata : Hi,   We are using Devforce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2206&amp;PID=8676#8676</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=946" rel="nofollow">danjal</a><br /><strong>Subject:</strong> 2206<br /><strong>Posted:</strong> 30-Sep-2010 at 8:17am<br /><br />Hi, <DIV>&nbsp;</DIV><DIV>We are using Devforce 2010 with VS 2010.</DIV><DIV>We want to change the display attribute&nbsp;for the properties in our entity classes and later we will use the required attribute&nbsp;and regularexpression attribute.</DIV><DIV>We have tried this, but it has no affect, when we view the data in a DataForm:</DIV><P><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>using System.ComponentModel.DataAnnotations;<BR>using System.ComponentModel;<BR>using IdeaBlade.Core.ComponentModel.DataAnnotations;</FONT></FONT></FONT></P><P style="MARGIN-RIGHT: 0px" dir=ltr><FONT color=#0000ff face=C&#111;nsolas><FONT color=#0000ff face=C&#111;nsolas><FONT color=#0000ff face=C&#111;nsolas><FONT size=2>namespace DomainModel{<BR>&#091;MetadataType(typeof(MetadataEntCustomer))&#093;<BR>public partial class EntCustomer<BR>{<BR>public static class MetadataEntCustomer<BR>{<BR>&#091;ReadOnly(true)&#093;<BR>&#091;Display(Name="Customer ID")&#093;<BR>public static int p_customerID;<BR>}<BR>}<BR>}</FONT></P><DIV><FONT color=#000000 size=2>I see that it is also possible to change this properties in the .edmx file.</FONT></DIV><DIV><FONT color=#000000 size=2>What is the right way to change this properties?</FONT></DIV></FONT></FONT></FONT><span style="font-size:10px"><br /><br />Edited by danjal - 30-Sep-2010 at 8:53am</span>]]>
   </description>
   <pubDate>Thu, 30 Sep 2010 08:17:39 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2206&amp;PID=8676#8676</guid>
  </item> 
 </channel>
</rss>