<?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 : Linq anonymous type sub collection query</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Linq anonymous type sub collection query</description>
  <pubDate>Fri, 24 May 2013 04:50:12 -700</pubDate>
  <lastBuildDate>Tue, 10 May 2011 12:47:30 -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=2655</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>Linq anonymous type sub collection query : Hi Tersius,   Try running the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2655&amp;PID=10626#10626</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2655<br /><strong>Posted:</strong> 10-May-2011 at 12:47pm<br /><br />Hi Tersius, <DIV>&nbsp;</DIV><DIV>Try running the query against the CacheOnly. (You will need to load all VehiclesMakes and VehicleModels in the cache first - but that you do with your query anyhow)</DIV><DIV>&nbsp;</DIV><DIV>Silvio.</DIV><span style="font-size:10px"><br /><br />Edited by sbelini - 10-May-2011 at 12:52pm</span>]]>
   </description>
   <pubDate>Tue, 10 May 2011 12:47:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2655&amp;PID=10626#10626</guid>
  </item> 
  <item>
   <title>Linq anonymous type sub collection query :  HiThanks. In the meantime is...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2655&amp;PID=10620#10620</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=988" rel="nofollow">tersiusk</a><br /><strong>Subject:</strong> 2655<br /><strong>Posted:</strong> 10-May-2011 at 12:04am<br /><br />Hi<div><br></div><div>Thanks. In the meantime is there any other way I can get the same sort of results?&nbsp;</div><div><br></div><div>edit: It seems to work if you use a concrete type.</div><div><br></div><div>Regards</div><span style="font-size:10px"><br /><br />Edited by tersiusk - 10-May-2011 at 2:13am</span>]]>
   </description>
   <pubDate>Tue, 10 May 2011 00:04:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2655&amp;PID=10620#10620</guid>
  </item> 
  <item>
   <title>Linq anonymous type sub collection query : Hi Tersius,    I have verified...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2655&amp;PID=10616#10616</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2655<br /><strong>Posted:</strong> 09-May-2011 at 3:57pm<br /><br />Hi Tersius, <DIV>&nbsp;</DIV><DIV><DIV></DIV>I have verified and this is indeed a bug.</DIV><DIV>We have already filed a bug and I will let you know as soon as we have a fix for it.</DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>Regards,</DIV><DIV>Silvio.</DIV>]]>
   </description>
   <pubDate>Mon, 09 May 2011 15:57:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2655&amp;PID=10616#10616</guid>
  </item> 
  <item>
   <title>Linq anonymous type sub collection query :    Hi I&amp;#039;m trying to execute...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2655&amp;PID=10610#10610</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=988" rel="nofollow">tersiusk</a><br /><strong>Subject:</strong> 2655<br /><strong>Posted:</strong> 09-May-2011 at 5:49am<br /><br /><div>Hi I'm trying to execute the following query but the result has the following error.</div><div><br></div><div>Also when I run this with normal entity framework the code executes and results are fine. Is this a bug? If so are there any kind of work around you can suggest?</div><div><br></div><div><b>"Unable to cast object of type 'System.Object&#091;&#093;' to type 'System.Collections.Generic.IEnumerable`1&#091;&lt;&gt;f__AnonymousType0`3&#091;System.Int64,System.String,System.String&#093;&#093;'."</b></div><div><pre style="font-family:Verdana;font-size:15;color:#c9d6d6;:black;">&nbsp;<span style="color:#cccc37;">var</span>&nbsp;<span style="color:#78c6c6;">query</span>&nbsp;<span style="font-weight:bold;color:#8888ff;">=</span>&nbsp;(<span style="font-weight:bold;color:#e1795b;">EntityQuery</span>)(<span style="color:#cccc37;">from</span>&nbsp;<span style="color:#78c6c6;">makes</span>&nbsp;<span style="color:#cccc37;">in</span>&nbsp;<span style="color:#78c6c6;">em</span><span style="font-weight:bold;color:#8888ff;">.</span><span style="color:#78c6c6;">VehicleMakes</span>&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#cccc37;">orderby</span>&nbsp;<span style="color:#78c6c6;">makes</span><span style="font-weight:bold;color:#8888ff;">.</span><span style="color:#78c6c6;">MakeName</span>&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#cccc37;">select</span>&nbsp;<span style="color:#cccc37;">new</span>&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;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#78c6c6;">Key</span>&nbsp;<span style="font-weight:bold;color:#8888ff;">=</span>&nbsp;<span style="color:#78c6c6;">makes</span><span style="font-weight:bold;color:#8888ff;">.</span><span style="color:#78c6c6;">VehicleMakeId</span>,&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#78c6c6;">Name</span>&nbsp;<span style="font-weight:bold;color:#8888ff;">=</span>&nbsp;<span style="color:#78c6c6;">makes</span><span style="font-weight:bold;color:#8888ff;">.</span><span style="color:#78c6c6;">MakeName</span>,&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#78c6c6;">Description</span>&nbsp;<span style="font-weight:bold;color:#8888ff;">=</span>&nbsp;<span style="color:#78c6c6;">makes</span><span style="font-weight:bold;color:#8888ff;">.</span><span style="color:#78c6c6;">MakeCode</span>,&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#78c6c6;">Children</span>&nbsp;<span style="font-weight:bold;color:#8888ff;">=</span>&nbsp;<span style="color:#cccc37;">from</span>&nbsp;<span style="color:#78c6c6;">model</span>&nbsp;<span style="color:#cccc37;">in</span>&nbsp;<span style="color:#78c6c6;">makes</span><span style="font-weight:bold;color:#8888ff;">.</span><span style="color:#78c6c6;">VehicleModels</span>&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;&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;<span style="color:#cccc37;">select</span>&nbsp;<span style="color:#cccc37;">new</span>&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;&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;&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;&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;<span style="color:#78c6c6;">Key</span>&nbsp;<span style="font-weight:bold;color:#8888ff;">=</span>&nbsp;<span style="color:#78c6c6;">model</span><span style="font-weight:bold;color:#8888ff;">.</span><span style="color:#78c6c6;">VehicleModelId</span>,&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;&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;&nbsp;<span style="color:#78c6c6;">Name</span>&nbsp;<span style="font-weight:bold;color:#8888ff;">=</span>&nbsp;<span style="color:#78c6c6;">model</span><span style="font-weight:bold;color:#8888ff;">.</span><span style="color:#78c6c6;">ModelName</span>,&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;&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;&nbsp;<span style="color:#78c6c6;">Description</span>&nbsp;<span style="font-weight:bold;color:#8888ff;">=</span>&nbsp;<span style="color:#78c6c6;">model</span><span style="font-weight:bold;color:#8888ff;">.</span><span style="color:#78c6c6;">ModelCode</span>&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;&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;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});</pre></div><span style="font-size:10px"><br /><br />Edited by tersiusk - 09-May-2011 at 6:22am</span>]]>
   </description>
   <pubDate>Mon, 09 May 2011 05:49:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2655&amp;PID=10610#10610</guid>
  </item> 
 </channel>
</rss>