title: How to use predicates with LINQ to query CRM 2011
body: <p>I am trying to use linqkit to Predicate. Getting following code when I am trying to compile.</p>
  
  <pre><code>public void TestPredicate(Guid[] productIds)
  {
      var predicate = PredicateBuilder.False&lt;Product&gt;();
      foreach (var productId in productIds)
      {
          var tempGuid = productId;
          predicate = predicate.Or(p =&gt; p.ProductId== tempGuid);
      }
  }
  
      var query = from p in context.CreateQuery("product")
              .AsExpandable().Where(predicate) select p;
  }
  </code></pre>
  
  <p><strong>Error 1:</strong> 'System.Linq.IQueryable' does not contain a definition for 'Where' and the best extension method overload 'System.Linq.Queryable.Where(System.Linq.IQueryable, System.Linq.Expressions.Expression>)' has some invalid arguments</p>
  
  <p><strong>Error 2</strong> Argument 2: cannot convert from 'System.Linq.Expressions.Expression>' to 'System.Linq.Expressions.Expression></p>
  
  <p>Please suggest me what I need to do fix it. </p>
  
  <p>Thanks</p>