有没有办法编写一个 LINQ 表达式来获得以下代码的相同结果?
var validations = new Func<conversion, bool>[] {
c => c.affiliate.affiliate_id > 0,
c => c.campaign_id > 0
};
var invalidConversions = from c in extractedConversions
where validations.Any(valid => !valid(c))
select c;
var validConversions = from c in extractedConversions
where validations.All(valid => valid(c))
select c;