title: Combine And/Or with PredicateBuilder?
body: <p>I have a list of <code>Ids</code> and I only want to do an <code>AND</code> on the first one and and <code>OR</code> on the subsequent ones.  In the past, I have kept a <code>counter</code> variable and when the <code>counter</code> is 1, I do the <code>And</code>, but after that I do an <code>OR</code>, but I was curious if there was an easier way:</p>
  
  <pre><code>foreach(string id in Ids)
  {
     predicate.And(x=&gt; id.Contains(x.id)); //I want to do an And only on the first id.
  }
  </code></pre>
  
  <p>This is what I have done in the past, but is there a more concise way:</p>
  
  <pre><code>int counter = 1;
  foreach (var Id in Ids)
  {
       string i = Id;
       if (counter == 1)
       {
           predicate = predicate.And(x =&gt; i.Contains(x.id));
           counter++;
        }
        else
        {
             predicate = predicate.Or(x=&gt;i.Contains(x.id));
            counter++;
        }
     }
  </code></pre>