title: LINQ and paging with a DataTable - can't get Skip working?
body: <p>Ok so this might be a dumb question, but I can't seem to figure it out. I thought I'd try out LINQ against a DataTable. I got my query working and now I'm trying to implement some simple paging.</p>
  
  <pre><code>DataTable dataTable = null;
  
  dataTable = GetAllDataTables();
  
  var query = from r in dataTable.AsEnumerable()
              orderby r.Field&lt;string&gt;(Constants.fileName)
              select r;
  
  query.Skip(WPP_PAGE_SIZE * pageIndex).Take(WPP_PAGE_SIZE);
  </code></pre>
  
  <p>My problem is that I get an error at query.Skip(...).</p>
  
  <blockquote>
    <p>Error 1   'System.Data.OrderedEnumerableRowCollection'
    does not contain a definition for
    'Skip' and no extension method 'Skip'
    accepting a first argument of type
    'System.Data.OrderedEnumerableRowCollection'
    could be found (are you missing a
    using directive or an assembly
    reference?)</p>
  </blockquote>
  
  <p>References I have:</p>
  
  <ul>
  <li>Microsoft.SharePoint</li>
  <li>System</li>
  <li>System.Core</li>
  <li>System.Data</li>
  <li>System.Data.DataSetExtensions</li>
  <li>System.Web</li>
  <li>System.Xml</li>
  </ul>
  
  <p>What am I missing?</p>