Chapter 15. Extending LINQ

One interesting aspect of Microsoft Language Integrated Query (LINQ) is its extensibility: you can extend LINQ by adding new operators, by writing your own implementation of standard query operators (for example, Where, OrderBy, and Distinct), and by implementing the IQueryable interface to access any kind of external data.

The first two options (adding new query operators or replacing existing ones) is fundamentally a way to customize LINQ to Objects. Working with objects in memory provides for a simple replacement or extension without the need to know very much about the existing implementation of LINQ to Objects. A different scenario is involved when you use LINQ to access data that does not consist of in-memory objects—for ...

Get Programming Microsoft® LINQ in Microsoft .NET Framework 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.