About This eBook 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

O'Reilly logo

IQueryable<T>

As you’ve seen before, LINQ to Objects operates on plain IEnumerable<T> objects, executing the query using the magic of iterators. All of this happens in memory in the same process as where the collection object is living. The brother to IEnumerable<T> allowing for remote execution of queries is called IQueryable<T> and is based on the concept of expression trees.

Let’s first take a look at the interface to set the scene. As shown here, every type that implements IQueryable<T> also implements IEnumerable<T>, which provides support to enumerate over the object. It’s this enumeration that will trigger the query captured by the queryable object to be translated and executed (for example, by sending a piece of T-SQL to a database server ...

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