如何在表达式树语法中编写此linq查询
from x in 100.To(999)
from y in 100.To(999)
let product = x * y
where product.IsEven()
select product
答案 0 :(得分:1)
相当于'from x from y select'是'SelectMany'关键字,与其他'Select'一起使用:
100.To(999).SelectMany(x => 100.To(999).Select(y => x * y))
.Where(x => x.IsEven())