title: IQueryable with Foreach on the result
body: <p>I'm trying to do a keyword search on an <code>IQueryable</code> object, but is there any way to do this without first converting it into a list? </p>
  
  <p>My code: </p>
  
  <pre><code>var customers = Customer.IQueryableAll(); // Method returns IQueryable containing all customers.    
  var customerHolder = new List&lt;Customer&gt;();
  
  foreach(var k in keywords) //keywords = List&lt;string&gt;
  {
     customerHolder.AddRange(customers.Where(x=&gt;x.FirstName.Contains(k) || x.LastName.Contains(k) || x.CompanyName.Contains(k)).ToList())
  }
  
  return customerHolder.Distinct();
  </code></pre>
  
  <p>This works if I want to display all the results at once, but the problem comes where I want to do paging. The function would still get all the entries from the database, before paging, so its very inefficient on large tables. (ie. <code>customerHolder.Skip(5).Take(5);</code> )</p>
  
  <p>Is there any way to integrate the foreach searching part into the query itself ? </p>
  
  <p>ie. </p>
  
  <pre><code>customers.Where( x =&gt; x.Name.Contains(anythingInKeyWords));
  </code></pre>
  
  <p>EDIT: For further clarification, I do want to <strong>maintain the OR</strong> in the above, so filtering and refiltering with multiple where clauses will not work. IE. Bill Job/Bill Gates > Search Bill Gates should return both entries because Bill Matches. </p>