title: Indexing IQueryable<int>?
body: <p>How do you index an IQueryable?</p>
  
  <p>I am using a LINQ to sql query to get in values from a particular column. The query is as follows,</p>
  
  <pre><code>var intitalQuery =  (from a in sql.GetTable&lt;Staff_Time_TBL&gt;()
                                  where a.Info_Data == SelectedOption
                                  select a.Staff_No).Distinct();
  </code></pre>
  
  <p>From there I want to be able index the <code>intitalQuery</code> variable and get values as needed.
  That value is then used in another query. 
  My first try was this,</p>
  
  <pre><code>  Column1.DataContext = sql.Staff_Time_TBLs.Where(item =&gt;                     
                       item.Section_Data == SelectedOption &amp;&amp;
                       item.Staff_No == intitalQuery[0];
  </code></pre>
  
  <p>Then I tried this from <a href="https://stackoverflow.com/questions/8293263/convert-iqueryableint-to-int">here</a> with no luck.</p>
  
  <pre><code>Column1.DataContext = sql.Staff_Time_TBLs.Where(item =&gt;
                       item.Section_Data == SelectedOption &amp;&amp;
                       item.Staff_No == intitalQuery.First());
  </code></pre>
  
  <p>From what I can from the link is that that way gets just the first value, I want to be able to get all values via indexing. How do you go about that?</p>