title: Using Linq To SQL to search for multiple strings in a field
body: <p>I'm trying to use Linq to SQL to search a text column for multiple matching words, but the query is not doing what I expect.</p>
  
  <p>Here is my sample code:</p>
  
  <pre><code>            string[] nameSearch = new string[2];
              nameSearch[0] = "John";
              nameSearch[1] = "Doe";
  
              var customers = context.Customers.AsQueryable();
              foreach (string name in nameSearch)
              {
                  customers = customers.Where(r =&gt; r.CustName.Contains(name));
              }
              Data.Customer[] results = customers.ToArray();
  </code></pre>
  
  <p>The query that runs is:</p>
  
  <pre><code>    SELECT [t0].[CustName]
      FROM [dbo].[Customer] AS [t0]
      WHERE ([t0].[CustName] LIKE @p0) AND ([t0].[CustName] LIKE @p1)
      -- @p0: Input NVarChar (Size = 5; Prec = 0; Scale = 0) [%Doe%]
      -- @p1: Input NVarChar (Size = 5; Prec = 0; Scale = 0) [%Doe%]
  </code></pre>
  
  <p>How do I fix this query?  (It's suppose to be searching for John and Doe, not Doe and Doe.)</p>