开发者

Is this the code the compiler generates from the following query expression? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this que开发者_JAVA技巧stion? Add details and clarify the problem by editing this post.

Closed 9 years ago.

Improve this question
     var result = from c1 in a1
                  from c2 in a1.a2
                  from c3 in a1.a2.a3
                  select new { c1.id, c2.id, c3.id };

Is this the code the compiler generates from the above query expression:

var result = a1.SelectMany(
      c1 => a1.a2.SelectMany(
         c2 => a1.a2.a3.Select(
            c3 => new {c1,c2,c3})));

thank you


You are correct.

This is a full outer join and will contain a1.Count * a2.Count * a3.Count items, including every combination of items from the source sequences/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜