title: Linq PredicateBuilder - Multiple ORs
body: <p>I'm trying to use the PredicateBuilder, as described here - <a href="http://www.albahari.com/nutshell/predicatebuilder.aspx" rel="nofollow noreferrer">http://www.albahari.com/nutshell/predicatebuilder.aspx</a></p>
  
  <p>The following code</p>
  
  <pre><code>var predicate = PredicateBuilder.False&lt;StreetDTO&gt;();
  
          predicate = predicate.Or(p =&gt; p.Locality.Contains(criteria.Locality));
          predicate = predicate.Or(p =&gt; p.Name.Contains(criteria.Name));
          predicate = predicate.Or(p =&gt; p.Town.Contains(criteria.Town));
  
          List&lt;StreetDTO&gt; streetData = StreetData.Instance();
  
          var streetList = from street in streetData.Where(predicate)
                           select street;
  </code></pre>
  
  <p>as far as I see this <em>should</em> work, according to the example</p>
  
  <pre><code>var newKids  = Product.ContainsInDescription ("BlackBerry", "iPhone");
  
  var classics = Product.ContainsInDescription ("Nokia", "Ericsson")
                        .And (Product.IsSelling());
  var query =
    from p in Data.Products.Where (newKids.Or (classics))
    select p;
  </code></pre>
  
  <p>but all I get is </p>
  
  <blockquote>
    <p>Error 1   The type arguments for method
    'System.Linq.Enumerable.Where(System.Collections.Generic.IEnumerable,
    System.Func)' cannot be
    inferred from the usage. Try
    specifying the type arguments
    explicitly.</p>
  </blockquote>
  
  <p>I'm trying to gain some understanding in LINQ 'on-the-job', so apologies if this is a simple question.</p>