开发者

Benefits of manual lookup over joining in LINQ?

Is constructing and using a manual lookup (ILookup<T>) approach any faster than using a join with Join or GroupJoin on a local IEnumerab开发者_运维问答le<T> sequence in LINQ?

I read somewhere that the compiler actually translates the inner sequence of Join and GroupJoin to ILookup<T> anyway.

What would ILookup<T> benefits of using it on it's own be?


It depends. If you're working with objects that are DataContext based, then the join gets translated all the way down into the SQL server via the select statement. IF its a POCO (or more specifically a Plain Old CLR collection) or something else, then yes, its utilized as ILookup.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜