O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How LINQ to Objects Works

So far, we’ve been looking at various query expression clauses that enable us to express queries, no matter that data domain we’re targeting. Even though most of our examples assumed in-memory data collections, all those queries would have worked equally well against, say, a relational database.

Because in-memory data is common, it makes sense for us to delve a little deeper into how LINQ support for those data collections is provided. This leads us to a discussion about the IEnumerable and IEnumerator interfaces, iterators, and LINQ to Objects. From this exploration, it will become clear how query expressions are executed lazily and what the implications of this execution model are.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required