title: PredicateBuilder to create a list of where conditions
body: <p>I have something like this:</p>
  
  <pre><code>class myClass {
    protected ICollection&lt;Expression&lt;Func&lt;event_info, bool&gt;&gt;&gt; _whereConditionsList = new List&lt;Expression&lt;Func&lt;event_info, bool&gt;&gt;&gt;();
  
    public void main() {
      _whereConditionsList.Add(ev =&gt; ev.createdby == 6);
      var query = from ev in dataConnection.event_info
                  where ev.isdeleted == 0
                  select ev;
      if (_whereConditionsList.Count() &gt; 0) {
        var predicate = PredicateBuilder.True&lt;event_info&gt;();
  
        foreach (var whereCond in _whereConditionsList) {
          predicate = predicate.And(whereCond);
        }
        query = query.Where(predicate);
      }
    evInfo = query.ToList(); 
  }
  </code></pre>
  
  <p>But it's having trouble with actually converting it into SQL code because it throws this error whenever it gets to query.ToList():</p>
  
  <pre><code>System.NotSupportedException: The LINQ expression node type 'Invoke' is not supported in LINQ to Entities.
   ...
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   ...
  </code></pre>
  
  <p>What am I doing wrong in my approach?</p>