title: Linq to Datarow, Select multiple columns as distinct?
body: <p>basically i'm trying to reproduce the following mssql query as LINQ</p>
  
  <pre><code>SELECT DISTINCT [TABLENAME], [COLUMNNAME] FROM [DATATABLE]
  </code></pre>
  
  <p>the closest i've got is</p>
  
  <pre><code>Dim query = (From row As DataRow In ds.Tables("DATATABLE").Rows _
                    Select row("COLUMNNAME") ,row("TABLENAME").Distinct
  </code></pre>
  
  <p>when i do the above i get the error</p>
  
  <blockquote>
    <p>Range variable name can be inferred
    only from a simple or qualified name
    with no arguments.</p>
  </blockquote>
  
  <p>i was sort of expecting it to return a collection that i could then iterate through and perform actions for each entry.
  maybe a datarow collection?</p>
  
  <p>As a complete LINQ newb, i'm not sure what i'm missing.
  i've tried variations on</p>
  
  <pre><code>Select new with { row("COLUMNNAME") ,row("TABLENAME")}
  </code></pre>
  
  <p>and get: </p>
  
  <blockquote>
    <p>Anonymous type member name can be
    inferred only from a simple or
    qualified name with no arguments.</p>
  </blockquote>
  
  <p>to get around this i've tried </p>
  
  <pre><code> Dim query = From r In ds.Tables("DATATABLE").AsEnumerable _
          Select New String(1) {r("TABLENAME"), r("COLUMNNAME")} Distinct
  </code></pre>
  
  <p>however it doesn't seem to be doing the distinct thing properly.</p>
  
  <p>Also, does anyone know of any good books/resources to get fluent?</p>