<?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 : Include keyword - Get All</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Include keyword - Get All</description>
  <pubDate>Sat, 11 Apr 2026 15:19:25 -700</pubDate>
  <lastBuildDate>Thu, 16 Sep 2010 12:29:06 -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=2161</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>Include keyword - Get All : I have used extension methods...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2161&amp;PID=8532#8532</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=926" rel="nofollow">jcrada</a><br /><strong>Subject:</strong> 2161<br /><strong>Posted:</strong> 16-Sep-2010 at 12:29pm<br /><br />I have used extension methods (http://msdn.microsoft.com/en-us/library/bb383977.aspx) for the entity manager then at the begining of my application I load the content of the citites table in asynchronous query, then when the user use the combobox the query is ready and my method return the items source getCities , in the worst case scenario the query will not be ready and the user must have to wait<br><br><pre style="font-family: c&#111;nsolas;"><span style="color: blue;">public</span>&nbsp;<span style="color: blue;">static</span>&nbsp;<span style="color: blue;">class</span>&nbsp;<span style="color: rgb43, 145, 175;">EntityManagerExtension</span><br>	{<br>		<span style="color: blue;">public</span>&nbsp;<span style="color: blue;">static</span>&nbsp;<span style="color: blue;">void</span>&nbsp;LoadDataBaseObjects(<span style="color: blue;">this</span>&nbsp;<span style="color: rgb43, 145, 175;">EntityManager</span>&nbsp;manager)&nbsp;<br>		{<br>			<span style="color: blue;">var</span>&nbsp;citites&nbsp;=&nbsp;&nbsp;manager.GetQuery&lt;<span style="color: rgb43, 145, 175;">City</span>&gt;();<br>			manager.ExecuteQueryAsync(citites);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> <br>		<span style="color: blue;">public</span>&nbsp;<span style="color: blue;">static</span>&nbsp;<span style="color: rgb43, 145, 175;">IEnumerable</span>&lt;<span style="color: rgb43, 145, 175;">City</span>&gt;&nbsp;getCities(<span style="color: blue;">this</span>&nbsp;<span style="color: rgb43, 145, 175;">EntityManager</span>&nbsp;manager)&nbsp;<br>		{<br>			<span style="color: blue;">var</span>&nbsp;citites&nbsp;=&nbsp;&nbsp;manager.GetQuery&lt;<span style="color: rgb43, 145, 175;">City</span>&gt;();<br>			<span style="color: blue;">return</span>&nbsp;manager.ExecuteQuery(citites);			<br>		}</pre><br>]]>
   </description>
   <pubDate>Thu, 16 Sep 2010 12:29:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2161&amp;PID=8532#8532</guid>
  </item> 
  <item>
   <title>Include keyword - Get All : I have a query where I use the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2161&amp;PID=8523#8523</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=826" rel="nofollow">Jakes</a><br /><strong>Subject:</strong> 2161<br /><strong>Posted:</strong> 15-Sep-2010 at 11:27pm<br /><br /><span ="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">I have a query where I use the "Include" keyword to include a navigation property as so:</span></font></div><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></font></div>Address.Include("<font color="#0000ff">Cities</font>");</span></font><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></font></div><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">This returns the one city for that address.</span></font></div><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></font></div><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">My question is, how do I return all the cities as part of a eager load and store it as a property on the Address object created by IdeaBlade.&nbsp;</span></font></div><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></font></div><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">I want to use this property to databind a combobox itemssource in a datagrid for user selection.</span></font></div><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; "><br></span></font></div><div><font apple-style-span="Apple-style-span" face="'Courier New', Courier, mono"><span apple-style-span="Apple-style-span" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">Thanks in advance.</span></font></div></span>]]>
   </description>
   <pubDate>Wed, 15 Sep 2010 23:27:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2161&amp;PID=8523#8523</guid>
  </item> 
 </channel>
</rss>