Linq查询中的选择操作何时成为投影操作?

时间:2022-05-04 02:14:25

I am a little confused , what are the projection operations in Linq queries? When does a Select operation in a Linq query become a Projection Operation? Can someone please enlighten me?

我有点困惑,Linq查询中的投影操作是什么? Linq查询中的选择操作何时成为投影操作?有人可以赐教吗?

1 个解决方案

#1


4  

When the select clause produces something other than a copy of the source element, the operation is called a projection.

当select子句生成除source元素副本之外的其他内容时,该操作称为投影。

something like this is called a projection operation

这样的事情被称为投影操作

var innerJoinQuery =
    from cust in customers
    join dist in distributors on cust.City equals dist.City
    select new { CustomerName = cust.Name, DistributorName = dist.Name };

#1


4  

When the select clause produces something other than a copy of the source element, the operation is called a projection.

当select子句生成除source元素副本之外的其他内容时,该操作称为投影。

something like this is called a projection operation

这样的事情被称为投影操作

var innerJoinQuery =
    from cust in customers
    join dist in distributors on cust.City equals dist.City
    select new { CustomerName = cust.Name, DistributorName = dist.Name };