A LINQ-to-T-SQL IQueryable LINQ provider I created to enable a real-life ADO.NET data-access layer for LINQ querying.

I was initially going to use the IQ Toolkit project, but as the test project didn't seem to work in .NET 4.0 when I ran it, I ended up borrowing concepts from it and its blog series to write my own provider. It isn't nearly as extensive as the IQ Toolkit, but it works, and in .NET 4.0 

It can also serve as an intermediary during the initial stages of Code First development with Entity Framework 4.1. For example, see the stackoverflow question.

  • Translates LINQ queries to T-SQL.
  • Handles all LINQ Queryable extension methods :
    • Join
    • Where
    • SelectMany
    • Min, Max
    • Select with anonymous projections
    • And more...
  • A small, generic library that can be applied to enable almost any ADO.NET data source for LINQ querying and incorporated into your project.
  • Strategy of letting the T-SQL language handle what it's strong at, and letting .NET's LINQ-to-Objects do the rest 
    • i.e. The provider isn't going to attempt to run System.String or Int32.Parse functions as T-SQL, but will defer execution of those method calls until the data comes back from the database.

A working example that uses Northwind is provided as a unit test project.


(I don't work for Microsoft. Just a programmer, but feel free to ask questions and I'll try to answer them if time permits.)

Last edited Oct 2, 2011 at 2:15 AM by TWebster, version 17