<?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 : Life without joins?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Life without joins?</description>
  <pubDate>Mon, 13 Apr 2026 16:47:32 -700</pubDate>
  <lastBuildDate>Wed, 21 Mar 2012 11:30:48 -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=3174</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>Life without joins? :   Hi darrelmiller,Sorry for...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3174&amp;PID=13049#13049</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> 3174<br /><strong>Posted:</strong> 21-Mar-2012 at 11:30am<br /><br />Hi darrelmiller,<div>&nbsp;</div><div>Sorry for the (very) late reply.</div><div>&nbsp;</div><div>You could also try: (based on NorthwindIBEntities)</div><div>&nbsp;</div><div><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">var</font></font></font><font size="2" face="C&#111;nsolas"><font size="2" face="C&#111;nsolas"> query = mgr.Orders</font></font></div><div><font size="2" face="C&#111;nsolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Select(ord =&gt;<font color="#0000ff"><font color="#0000ff"><font color="#0000ff">new</font></font></font> {orderNumber = ord.OrderID,</font></div><div><font size="2" face="C&#111;nsolas">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;salesPersonManager = ord.Employee.Employee2.FirstName});</font></div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Wed, 21 Mar 2012 11:30:48 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3174&amp;PID=13049#13049</guid>
  </item> 
  <item>
   <title>Life without joins? :  Inthisdocumentation page it...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3174&amp;PID=12293#12293</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1359" rel="nofollow">darrelmiller</a><br /><strong>Subject:</strong> 3174<br /><strong>Posted:</strong> 21-Dec-2011 at 6:13am<br /><br /><div style="margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-: initial; -: n&#111;ne; "><div style="text-align: left; "><font color="#4d4d4d" face="'Courier New', Courier, mono" size="2"><span style="line-height: normal; white-space: pre; ">In&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/linq-join-examples" target="_blank">this</a>&nbsp;documentation page it is suggested that we should be able to avoid joins&nbsp;</span></font></div><div style="text-align: left; "><font color="#4d4d4d" face="'Courier New', Courier, mono" size="2"><span style="line-height: normal; white-space: pre; ">to create a more natural looking request. &nbsp;I have run into a case where I don't&nbsp;</span></font></div><div style="text-align: left; "><font color="#4d4d4d" face="'Courier New', Courier, mono" size="2"><span style="line-height: normal; white-space: pre; ">see how to do this without joins.<div><br></div><div>Consider your example of customers and orders. &nbsp;Say I wanted to create a list&nbsp;</div><div>of orders and their corresponding sales region where the sales region was a&nbsp;</div><div>property of customer.</div><div><br></div><div>So, the join syntax would be&nbsp;</div><div><br></div><div><span style="font-size: 11px; : rgb214, 227, 188; "><font face="'Courier New', Courier, mono">query &nbsp;&nbsp;= from o in manager.Orders</font></span></div><div><font face="'Courier New', Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; join &nbsp;c in manager.Customers on o.CustomerId = c.Id</font></div><div><div style="text-align: -webkit-auto; "><font face="'Courier New', Courier, mono">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; join &nbsp;sr in manager.SalesRegions on c.SalesRegionId = sr.Id</font></div><font face="'Courier New', Courier, mono"><span style="font-size: 11px; : rgb214, 227, 188; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;select new { OrderNumber = o.Number, SalesRegion = sr.Name };</span><br style="font-size: 11px; : rgb214, 227, 188; "><br style="font-size: 11px; : rgb214, 227, 188; "><span style="font-size: 11px; : rgb214, 227, 188; ">results = query.ToList()</span>&nbsp;<br></font><div><br></div><div><br></div><div><font color="#4d4d4d" face="Arial, Helvetica, sans-serif" size="2">From the examples in your documentation I wasn't able to see how to create a query that projects from more than one entity in the join,&nbsp;</font></div><div><font color="#4d4d4d" face="Arial, Helvetica, sans-serif" size="2">so I was in the process of telling you how it could not be done and I found out how.... So rather than throwing this email away, I'll post</font></div><div><font color="#4d4d4d" face="Arial, Helvetica, sans-serif" size="2">what I think is a solution and maybe someone can tell me if I'm on the right track.</font></div><div><font color="#4d4d4d" face="Arial, Helvetica, sans-serif" size="2"><br></font></div><div><font color="#4d4d4d" face="Arial, Helvetica, sans-serif" size="2">With method chaining,</font></div></div><div><font color="#4d4d4d" face="Arial, Helvetica, sans-serif" size="2"><br></font></div><div><font color="#4d4d4d" face="'Courier New', Courier, mono" size="2"><div>query = manager.SalesRegions</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .SelectMany(sr =&gt; sr.Customers)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .SelectMany(c =&gt; c.Orders)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Select(o =&gt; new {OrderNumber = o.Number,&nbsp;</div><div>                          SalesRegion = o.Customer.SalesRegion.Name});</div><div><br></div></font></div></span></font></div><font color="#4d4d4d" face="'Courier New', Courier, mono" size="2"><br ="apple-interchange-newline"=""></font></div><span style="font-size:10px"><br /><br />Edited by darrelmiller - 21-Dec-2011 at 6:14am</span>]]>
   </description>
   <pubDate>Wed, 21 Dec 2011 06:13:29 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3174&amp;PID=12293#12293</guid>
  </item> 
 </channel>
</rss>