Query Expression Translation

To execute a query expression in a way other than in-memory processing of sequences based on iterators, as done in LINQ to Objects, you must be able to make sense of the querying intent specified by the user. While keeping unified query syntax across different data domains, LINQ must provide for a rich extensibility story that allows third parties to plug in to the query execution pipeline.

You’ve already seen the big-hammer approach to intercepting query expressions, simply by providing an implementation of the query pattern over any type you see fit. For example, to provide a LINQ-compatible object model over some domain-specific concept like a Table<T> (which could represent a table in a relational database), you ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.