------解决方案-------------------- .Where<T>(Predicate) 是延迟执行的,可以利用它来拼凑多个条件
------解决方案--------------------
Expression<Func<TData, bool>> w = (data) => true; w = (data) => w(data) && data.a == aaa; // where a = aaa w = (data) => w(data) && data.b == bbb; // where a = aaa and b = bbb w = (data) => w(data) || data.c == ccc; // where (a = aaa and b = bbb) or c = ccc ... var query = from x in datasource where w(x);
------解决方案--------------------
------解决方案-------------------- var query = ... ... query = from x in query join y in anothertable on x.xxx equals y.yyy select xxx;