使用查询表达式而不是 lambda 表达式有什么意义?它不仅更慢而且更冗长(见这里):
示例(来自上面的链接):
QE: var products = from p in northwind.Products where p.Category.CategoryName == "Beverages" select p;
LE: var products = northwind.Products.Where(p => p.Category.CategoryName == "Beverages");
结果(来自上面的链接):
QE: 00:00:00.0019557, avg. 00:00:00.0004552
LE: 00:00:00.0000574, avg. 00:00:00.0000133
仅仅为了可读性而使用慢 34 倍的代码真的值得吗?