title: LINQ vs. DataTable.Select - How can I get the same results?
body: <p>I'm trying to rewrite a direct (disconnected) DataSet.DataTable.Select to LINQ for a textual search:</p>
  
  <pre><code>string search = "ProductNo like '%" + searchpattern + 
      "%' OR ProductName like '%" + searchpattern + 
      "%' OR Description like '%" + searchpattern +  "%'";
  
  DataSetProducts.sk_productsRow[] dsp = (DataSetProducts.sk_productsRow[])dsProducts.sk_products.Select(search, sort);
  </code></pre>
  
  <p>This works really fast. However if I re-enact it in LINQ:</p>
  
  <pre><code>productlist = from prds in dsProducts.sk_products.AsEnumerable()
      where (prds.Field&lt;string&gt;("productno").Contains(searchpattern) || 
             prds.Field&lt;string&gt;("productname").Contains(searchpattern) || 
             prds.Field&lt;string&gt;("description").Contains(searchpattern))
      select prds;
  </code></pre>
  
  <p>It becomes really slow because of the text-operations, and will return far less rows.
  How can I achieve same results with the same speed? I have only ~1000 records in the table.</p>