<?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 : Getting Related Parent Entities</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Getting Related Parent Entities</description>
  <pubDate>Sat, 11 Apr 2026 12:47:44 -700</pubDate>
  <lastBuildDate>Tue, 08 Dec 2009 17:30:33 -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=1577</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>Getting Related Parent Entities :   Originally posted by manis...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1577&amp;PID=5913#5913</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> 1577<br /><strong>Posted:</strong> 08-Dec-2009 at 5:30pm<br /><br /><table width="99%"><tr><td class="BBquote"><strong><em>Originally posted by manishaudio</strong></em><br /><br /><div><font color="#008000" size="2"></font><font size="2"></font><p></p><p><font size="2">_mgr.Assets.Include(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"Room"</font></font><font size="2">)</font></p></div></td></tr></table><br><br><p><font size="2">_mgr.Assets.Include(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"Room.Building.Location"</font></font><font size="2">) will bring the entire object graph into the cache<br></font></p><p><br></p>]]>
   </description>
   <pubDate>Tue, 08 Dec 2009 17:30:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1577&amp;PID=5913#5913</guid>
  </item> 
  <item>
   <title>Getting Related Parent Entities : I have an application that has...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1577&amp;PID=5907#5907</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=639" rel="nofollow">manishaudio</a><br /><strong>Subject:</strong> 1577<br /><strong>Posted:</strong> 08-Dec-2009 at 9:48am<br /><br />I have an application that has the following hierarchy - Locations --&gt; Buildings --&gt; Rooms --&gt; Assets.&nbsp; I am creating a datagrid with all assets and need to display the room, building, location as well.&nbsp;&nbsp; Currently, I am having issues getting the Building and Location when I populate assets.&nbsp; I was able to get the Room data using the Include method on my query.&nbsp; Here is my code snippet.&nbsp;&nbsp; <DIV>&nbsp;</DIV><DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P>private</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> LoadData()</P><P>{</P><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// _mgr.ExecuteQueryAsync(_mgr.Rooms, GotRooms, null);</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// _mgr.ExecuteQueryAsync(_mgr.Buildings, GotBuildings, null);</P></FONT></FONT><FONT size=2><P></P><P>_mgr.ExecuteQueryAsync(_mgr.Assets.Include(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Room"</FONT></FONT><FONT size=2>), GotAssets, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>);</P><P>}</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>private</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> GotAssets(</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EntityFetchedEventArgs</FONT></FONT><FONT size=2> args)</P><P>{</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (args.Error != </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>)</P><P>{</P><P>WriteMessage(args.Error.Message);</P><P>}</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>else</P></FONT></FONT><FONT size=2><P>{</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>foreach</FONT></FONT><FONT size=2> (</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Asset</FONT></FONT><FONT size=2> asset </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>in</FONT></FONT><FONT size=2> args.Result)</P><P>{</P><P></P><P>_assets.Add(asset);</P><P>}</P><P></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>&nbsp;</P></FONT></FONT><FONT size=2><P></P><P></P><P>}</P><P>}</P></FONT></DIV>]]>
   </description>
   <pubDate>Tue, 08 Dec 2009 09:48:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1577&amp;PID=5907#5907</guid>
  </item> 
 </channel>
</rss>