LINQ Any vs Exists Performance [duplicate]
Possible Duplicate:
Linq .Any VS .Exists - Whats the difference?
Is there a performance difference between using any vs exists in a LINQ query开发者_C百科? Specifically LINQ to Entities.
Exists
requires an instance of List<T>
while Any
is invoked on IEnumerable<T>
. This means you have the potential for increased memory efficiency as IEnumerable<T>
can be evaluated lazily.
精彩评论