<?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 : Defining new navigation properties in code</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Defining new navigation properties in code</description>
  <pubDate>Sun, 12 Apr 2026 13:46:05 -700</pubDate>
  <lastBuildDate>Mon, 30 Aug 2010 14:39:40 -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=2106</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>Defining new navigation properties in code :  You can write your own properties...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2106&amp;PID=8277#8277</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 2106<br /><strong>Posted:</strong> 30-Aug-2010 at 2:39pm<br /><br />You can write your own properties in the developer partial classes.<div><br></div><div>In the Silverlight _MiniDemos app for Business Object Persistence, see the following demo methods:<br></div><div><ul><li>DisplayAllEmployeesWithTotalOrderRevenuesSyncProperty()</li><li>GetEmployeeWithTotalOrderRevenueAsyncProperty()</li><li>DisplayAllEmployeesWithTotalOrderRevenuesAsyncProperty()</li><li>GetEmployeeWithTotalOrderRevenueAsyncMethod()</li></ul></div><div><div>and the corresponding properties and methods defined in the Employee partial developer class. &nbsp;These illustrate several different approaches to writing a property that requires data retrieval in an async environment.</div></div><div><br></div><div>You might also be able to add associations in the conceptual model and have DevForce generate the navigation properties for you. I haven't used that approach, but it might be worth looking into.&nbsp;</div><div><br></div>]]>
   </description>
   <pubDate>Mon, 30 Aug 2010 14:39:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2106&amp;PID=8277#8277</guid>
  </item> 
  <item>
   <title>Defining new navigation properties in code : My database has some foreign key...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2106&amp;PID=8269#8269</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=919" rel="nofollow">kpozin</a><br /><strong>Subject:</strong> 2106<br /><strong>Posted:</strong> 30-Aug-2010 at 7:37am<br /><br />My database has some foreign key relationships that exist in the tables but are not formally specified by SQL Server foreign key constraints, and are therefore not visible to the Entity Framework. The schema is somewhat inflexible, so I'd like to extend a DevForce-generated entity partial class in the shared code to provide access to these "navigation properties" on both the server and the client side.<br><br>For example, I might have <code>Contact</code>, <code>Company</code>, and <code>Address</code> tables. I would want to make a property that will return a <code>Contact</code>'s <code>Company</code>'s <code>Address</code> object.I would want to extend the <code>Contact</code> class and add a  <code>CompanyAddress { get; }</code> property (a setter would be great, too). Or <font face="Courier New, Courier, mono">Contact</font> might have a <font face="Courier New, Courier, mono">PersonId </font>field, but be missing a foreign key constraint to the <font face="Courier New, Courier, mono">Person </font>table.<br><br>What's the best way to expose such queries in new shared properties? Which attributes should I include? Which methods should I be calling to ensure that asynchronous access and DevForce interceptor actions continue to work?<br>]]>
   </description>
   <pubDate>Mon, 30 Aug 2010 07:37:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2106&amp;PID=8269#8269</guid>
  </item> 
 </channel>
</rss>