What is LINQ?
LINQ stands for Language-Integrated Query,
which allows .NET programs (e.g. C# or
VB.NET) to connect to databases.
It is an O/R (Object-Relational) mapping tool, with some similarities to
Hibernate or LlblGen. LINQ is type-safe, queries get compiled into MSIL on
the fly, and your C# WHERE clauses are translated into SQL and sent to SQL server for execution. In short, it makes design of data access layers safer and faster. In C# 3.0, linq code looks
var q =
from p in db.Products
where p.ProductName == "Pen"
Latest source code is in subversion on code.google.com:
Zipped releases are on the
Coming in 2008 May:
Thomas Glaser contributing first part of Ingres support.
Pascal Crappone refactored entire codebase.
Bryan Livingstone started work on Visual Metal.
Douglas Six from France has ported the provider to SqlLite. Peter Magnusson from
Sweden maintains it - thanks to both!
Status Update - 2008 Jan:
Oracle support is back - but it's tested on OracleXE only.
Please write to tell me if it works on regular Oracle.
We now have a newsgroup: http://groups.google.com/group/dblinq
Status Update - 2007 Nov:
1. Miguel de Icaza is considering adding this project to
- which required re-licensing under MIT license.
2. Suspended Oracle support, because my Oracle box died. The Oracle provider compiles,
but status is unknown.
3. Added support for client-side enums.
4. Partial support for stored procedures and stored functions
in MySql and PostgreSQL
5. BULK Insert support
in MS provider, and multi-row insert in Mysql provider.
6. Bug fixes in 'IS NULL/ IS NOT NULL' clauses
7. Starting to add test cases from '101
' - please help (there is a C# version available also, but license
says 'All Rights Reserved' - not sure if I can place it in this project). Failure
rate: 18 out of 67.
8. Preparing a 2007-Nov source code release
Status Update - 2007 Sep:
1. New package supports Visual Studio 2008 (Orcas) Beta2. Download ver 0.11
. My blog
entry discusses the main changes.
2. Thanks to Bryan Livingston for the original package, ver 0.10.
3. Added support for PostgresSQL
4. Added support for GROUP BY, HAVING clauses.
How good is DB_Linq compared to Microsoft's LINQ-to-SQL?
DB_Linq is prototype software. Simple queries do work, complex ones probably
not. That said, you are free to use it in your production code - just test everything
Broken/missing functionality in this project: Transactions, subqueries, Linq-to-Entities
In comparison, Microsoft LINQ-to-SQL is approaching production quality. Microsoft only supports MS Sql Server and Acces, but has nice GUI integration, has
Linq-to-entities, and can call stored procedures.
The only two things that DB_Linq does better than MS: support for other vendors,
and bulk insert.
1. Download source code package, compile in Visual Studio.
2. edit and run script 'run_myMetal.bat' (or run_oraMetal or run_pgMetal) to generate
a C# file representing your database
3. include DbLinq.Mysql.dll and the new file in your project (or DbLinq.Postgres.dll
- Microsoft Visual Studio 2008 (Orcas) Beta2 (free
- Download source code package (ver 0.11) from
- if you want to contribute, use
) to download source code from version control (Tortoise users
can just click turtle picture on the right)
- MySql 5.0 and MySql query browser
- to run the DB create script
- Alternately, download pgsql packages.
MIT license (formerly LGPL, changed to be compatible with Mono project)
Contact / Questions / Bugs / Comments:
Project lead: Jiri George Moudry, email@example.com
A good way to contact us is on this forum:
Optionally, you could also leave a message on my
Linq (or DLinq) documentation can be found in the doc/ folder of your C# 3.0 installation.
Also, here is the Linq project home
DB_Linq has currently no documentation.
Got mail from Oren from the NHibernate project. They are also working on a Linq
interface, and making good progress.
I have started to work on an implementation of Linq to NHibernate, you can
see the current results here: