title: using linq to select a column from a datatable
body: <p>Currently I am using sql and hitting the database to populate a dropdown.</p>
  
  <pre><code>Dim sqlStatement = "SELECT DISTINCT IMLOCN FROM table order by IMLOCN desc"
      LocationDropDown.DataSource = DB.sql(dbSalesWeb, sqlStatement)
      LocationDropDown.DataTextField = "IMLOCN"
      LocationDropDown.DataBind()
      LocationDropDown.Items.Insert(0, "ALL")
  </code></pre>
  
  <p>DB is a custom class and sql returns a Datatable. I'd like to use linq on a datatable that already has the IMLOCN</p>
  
  <pre><code> Protected Sub updateDropDowns(ByVal dt As DataTable)
  
  
      Dim location = From u In dt.Rows _
                          Select u("IMLOCN") _
                          Distinct
  
      LocationDropDown.DataSource = location.ToList
      LocationDropDown.DataBind()
  
  End Sub
  </code></pre>
  
  <p>I've tried
   <code>dt.AsEnumerable()</code>
  and <code>Dim location = From u In dt.AsEnumerable _
                              Select u.Field(Of String)("IMLOCN") _
                              Distinct</code>
  I'd like to be able to use linq and I'd like to learn more about it</p>