LINQ Join with Multiple From Clauses

前端 未结 4 1796
耶瑟儿~
耶瑟儿~ 2020-12-08 02:18

When writing LINQ queries in C#, I know I can perform a join using the join keyword. But what does the following do?

from c in Companies
from e          


        
4条回答
  •  庸人自扰
    2020-12-08 02:24

    This will get translated into a SelectMany() call. It is essentially a cross-join.

    Jon Skeet talks about it on his blog, as part of the Edulinq series. (Scroll down to Secondary "from" clauses.)

提交回复
热议问题