<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>LINQ: Building an IQueryable Provider - Part IX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx</link><description>This is the nineth in a series of posts on how to build a LINQ IQueryable provider. If you have not read the previous posts here's a handy list of all the fun you've been missing. Complete list of posts in the Building an IQueryable Provider series It's</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>LINQ: Building an IQueryable Provider - Part IX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7138679</link><pubDate>Thu, 17 Jan 2008 06:21:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7138679</guid><dc:creator>Noticias externas</dc:creator><description>&lt;p&gt;This is the nineth in a series of posts on how to build a LINQ IQueryable provider. If you have not read&lt;/p&gt;
</description></item><item><title>LINQ: Building an IQueryable Provider - Part IX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7139823</link><pubDate>Thu, 17 Jan 2008 08:21:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7139823</guid><dc:creator>LINQ in Action roller</dc:creator><description>&lt;p&gt;This is the nineth in a series of posts on how to build a LINQ IQueryable provider. If you have not read&lt;/p&gt;
</description></item><item><title>re: LINQ: Building an IQueryable Provider - Part IX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7140796</link><pubDate>Thu, 17 Jan 2008 12:50:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7140796</guid><dc:creator>Frans Bouma</dc:creator><description>&lt;p&gt;Interesting :)&lt;/p&gt;
&lt;p&gt;I do this differently. I work with scopes. Scopes require a projection. For example the Join has two sides, both sides are individual scopes and thus require a projection. One can then decide when building the final query which ones to merge and which have to be wrapped into a derived table. &lt;/p&gt;
&lt;p&gt;My system isn't reaching the end query you have, it has 1 derived table, as the end tree (which can't be merged further) contains a where node at the top with a select (and which thus markes a different scope) as source. The advantage is that it also doesn't need a lot of visitor calls to traverse the tree a lot of times, it can work with the information gathered up front. I use a preprocessor visitor to traverse the tree once to set all the scopes and aliases per scope.&lt;/p&gt;
&lt;p&gt;I require this as our system works with relation objects, so when for example a join appears in the query, I have to create a relation object between the two sides to hand to our query API. At that point I have to reduce the trees on both sides and can't rely on post-processing with a visitor. &lt;/p&gt;
&lt;p&gt;Btw, your query showed an error in my system, thanks for that :)&lt;/p&gt;
&lt;p&gt;Following the logic of this query and the error I got (it assumed that a missing projection in the final node always suggested an entity fetch), I wrote this little query which gives wrong results on Linq to Sql (and mine)&lt;/p&gt;
&lt;p&gt;var q = from c in db.Customers&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;join o in db.Orders on c.CustomerID equals o.CustomerID into co&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select co;&lt;/p&gt;
&lt;p&gt;As 'GroupJoin' is a nasty method to handle, the typical way to do that is to pick the left side and only pull the right side into the query if it's referenced. However 'co' is IEnumerable&amp;lt;Order&amp;gt;, but the query simply fetches all customers. &lt;/p&gt;
&lt;p&gt;What's more is that the developer likely assumes that co is the joined list of customer and order.&lt;/p&gt;
&lt;p&gt;Perhaps something to address in your next episode of this series :) Oh, and I think also a bit of information should be explained about 'Funcletization' (who cooked that up? ;)), which is a key element of a successful Linq provider (IMHO)&lt;/p&gt;</description></item><item><title>Community Convergence XXXIX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7180675</link><pubDate>Mon, 21 Jan 2008 09:42:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7180675</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the XXXIX issue of Community Convergence. The big news this week is that Microsoft has begun&lt;/p&gt;</description></item><item><title>Community Convergence XXXIX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7180703</link><pubDate>Mon, 21 Jan 2008 09:43:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7180703</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the XXXIX issue of Community Convergence. The big news this week is that Microsoft has begun&lt;/p&gt;</description></item><item><title>Community Convergence XXXIX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7180735</link><pubDate>Mon, 21 Jan 2008 09:45:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7180735</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the XXXIX issue of Community Convergence. The big news this week is that Microsoft has begun&lt;/p&gt;
</description></item><item><title>re: LINQ: Building an IQueryable Provider - Part IX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7374437</link><pubDate>Fri, 01 Feb 2008 16:33:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7374437</guid><dc:creator>Fred</dc:creator><description>&lt;p&gt;What's the license on the attached license?&lt;/p&gt;</description></item><item><title>re: LINQ: Building an IQueryable Provider - Part IX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7459731</link><pubDate>Tue, 05 Feb 2008 11:23:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7459731</guid><dc:creator>Fred</dc:creator><description>&lt;p&gt;What's the license on the attached *sample*? typo&lt;/p&gt;</description></item><item><title>re: LINQ: Building an IQueryable Provider - Part IX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7494696</link><pubDate>Wed, 06 Feb 2008 20:28:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7494696</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Hi Matt,&lt;/p&gt;
&lt;p&gt;Just wanted to say that this series is very useful for various projects I'm working on - looking forward to the next episode.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;</description></item><item><title>Sesión "LINQ en profundidad” en TechDays 2008</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#7843879</link><pubDate>Fri, 22 Feb 2008 05:02:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7843879</guid><dc:creator>Sobre C#, LINQ y algo más...</dc:creator><description>&lt;p&gt;Un a&amp;#241;o m&amp;#225;s, Microsoft Espa&amp;#241;a ha tenido a bien confiarme la presentaci&amp;#243;n sobre LINQ en su evento m&amp;#225;s importante&lt;/p&gt;
</description></item><item><title>re: LINQ: Building an IQueryable Provider - Part IX</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#8081895</link><pubDate>Fri, 07 Mar 2008 02:50:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8081895</guid><dc:creator>Marc Brooks</dc:creator><description>&lt;p&gt;In the UnusedColumnRemover.VisitSelect, why can't you use your local columns value instead of repeatedly referencing the select.Columns property?&lt;/p&gt;</description></item><item><title>LINQ: Building an IQueryable Provider - Part X</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#8710296</link><pubDate>Wed, 09 Jul 2008 02:33:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8710296</guid><dc:creator>The Wayward WebLog</dc:creator><description>&lt;p&gt;This is the tenth in a series of posts on how to build a LINQ IQueryable provider. If you have not read the previous posts you'll want to find a nice shady tree, relax and meditate on why your world is so confused and full of meaningless tasks that it&lt;/p&gt;
</description></item><item><title>Book Links</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#8879288</link><pubDate>Tue, 19 Aug 2008 20:23:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8879288</guid><dc:creator>Programming Linq Book Log</dc:creator><description>&lt;p&gt;Chapter Page Url 4 111 &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/bb386907.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb386907.aspx&lt;/a&gt; 4 111 &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/bb399400.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb399400.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Building a LINQ IQueryable Provider - Part XII</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#9114775</link><pubDate>Tue, 18 Nov 2008 04:06:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9114775</guid><dc:creator>The Wayward WebLog</dc:creator><description>&lt;p&gt;This is the twelfth in a series of posts on how to build a LINQ IQueryable provider. If you have not&lt;/p&gt;
</description></item><item><title>LINQ links</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#9119370</link><pubDate>Tue, 18 Nov 2008 20:27:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9119370</guid><dc:creator>The Wayward WebLog</dc:creator><description>&lt;p&gt;Part I - Reusable IQueryable base classes Part II - Where and reusable Expression tree visitor Part II&lt;/p&gt;
</description></item><item><title>LINQ: Building an IQueryable provider series</title><link>http://blogs.msdn.com/mattwar/archive/2008/01/16/linq-building-an-iqueryable-provider-part-ix.aspx#9490104</link><pubDate>Thu, 19 Mar 2009 17:52:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9490104</guid><dc:creator>Floating Heart</dc:creator><description>&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/mattwar/pages/linq-links.aspx"&gt;http://blogs.msdn.com/mattwar/pages/linq-links.aspx&lt;/a&gt; Here&amp;amp;#39;s a list of all the posts in the building&lt;/p&gt;
</description></item></channel></rss>