Skip to content
fishpi edited this page Sep 13, 2010 · 3 revisions

This is a thoroughly experimental library for wrapping ADO queries in a LINQ provider so that various extra constraints like sort order or result limit can be set after the query is created and lazily-evaluated. This is mainly intended to teach myself LINQ, and is not guaranteed to be anywhere near production quality.

Motivation

ORM layers that attempt to do too much of the mapping for you prevent fine-grained control of the database queries, which can be unacceptable when performance is critical. Furthermore, several useful SQL query constructions are not currently available in LINQ to entities.

One place where LINQ is very useful, however, is in allowing lazy evaluation of queries. Specifically, a query can be constructed within data access code and returned to the caller without being evaluated. The caller can then set various additional properties on the query and execute it, without the details of the query being exposed outside the data access layer. Therefore there is some utility to wrapping an existing ADO query into a LINQ object before returning it.

License

The code is based heavily on the examples set out in this blog post and on IQToolkit hence this is licensed under the Microsoft Public License.

Clone this wiki locally