<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://dotnet.dzone.com"  xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dz="http://www.developerzone.com/modules/dz/1.0">
<channel>
 <title>.NET Zone - Comments for &quot;Is LINQ leaving Java in the dust?&quot;</title>
 <link>http://dotnet.dzone.com/news/linq-leaving-java-dust</link>
 <description>Comments for &quot;Is LINQ leaving Java in the dust?&quot;</description>
 <language>en</language>
<item>
 <title>FYI, LINQ does handle</title>
 <link>http://dotnet.dzone.com/news/linq-leaving-java-dust#comment-783</link>
 <description>&lt;!--paging_filter--&gt;&lt;p&gt;FYI, LINQ does handle groupings and even complex query building naturally. There is both a SQL-like syntax and a methods-based syntax. The first is actually just a shorthand for the latter:&lt;/p&gt;&lt;p&gt;&lt;em&gt;var q = from c in db.Customers where c.City==&amp;quot;London&amp;quot; group c by c.ZipCode&lt;/em&gt;&lt;/p&gt;&lt;p&gt;is equivalent to&lt;/p&gt;&lt;p&gt;&lt;em&gt;var q = db.Customers.Where(c =&amp;gt; c.City==&amp;quot;London&amp;quot;).GroupBy(c =&amp;gt; c.ZipCode)&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Both will return a list of &amp;quot;groups&amp;quot; each with a &lt;em&gt;Key&lt;/em&gt; property holding the zipcode. The individual customers for each zipcode can be accessed by enumerating over the group (it&#039;s an enumeration of &amp;quot;Customers&amp;quot;). I don&#039;t see any complex workarounds. Also (when performed against the database) it will retrieve all of the customers from London at once (building a query with a where clause) and perform the grouping on this set. Can you explain how this could possibly perform better?&lt;/p&gt;&lt;p&gt;You also misunderstand type inference. C# is still very much a statically typed language. When the compiler encounters &lt;em&gt;var s = &amp;quot;Hello World&amp;quot;;&lt;/em&gt; it simply infers that the type of s is &lt;em&gt;string&lt;/em&gt; just as if you had written &lt;em&gt;string s = &amp;quot;hello World&amp;quot;;&lt;/em&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
 <pubDate>Sun, 10 Feb 2008 23:23:36 -0500</pubDate>
 <dc:creator>honeymonster</dc:creator>
 <guid isPermaLink="false">comment 783 at http://dotnet.dzone.com</guid>
</item>
</channel>
</rss>
