where 条件のリストを動的に作成したいと考えています。これが私のコードのスニペットです:
protected Expression<Func<event_info, bool>> _wherePredicate = c => true;
public void main() 
{
 _wherePredicate = _wherePredicate.And(c => c.createdby == 6);
 _wherePredicate = _wherePredicate.And(c => c.isdeleted == 0);
 var query = from ev in dataConnection.event_info
                       where ev.isdeleted == 0
                       select ev;
 Results = query.Where(_wherePredicate).ToList(); 
}
ただし、linq-to-entities は Invoke メソッドをサポートしていないため、これは機能しません。
linq-to-entities で述語を組み合わせる良い方法は何ですか?