Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Most complete ORM with LINQ support?

I'm looking for an ORM that offers complete or near-complete LINQ support.

LINQ to SQL
- Supports about everything inside of LINQ (.Contains, Math.Log, etc)
- Cannot eager load relationship properties without creating a new datacontext

ADO.NET Entity Framework
- Terrible LINQ support (lots of missing features).
- Great mapping features - Can eager load on demand with .Include methods on an ObjectQuery<>

LightSpeed
- Great LINQ support missing some features (.Contains within a Where)
- Some of the SQL generated is very inefficient.

None of these seem to fit just perfectly, I honestly wish I could take bits and pieces from each. I personally really like ADO.NET EF except the features it is missing make it just frustrating to use.

I know some people praise NHibernate up and down and I'm not knocking it but I spent today trying it out and it's ok but it's LINQ support is not that great.

like image 334
Chad Moran Avatar asked Mar 01 '09 21:03

Chad Moran


People also ask

Is LINQ A ORM?

LINQ to SQL is an object-relational mapping (ORM) implementation that allows the direct 1-1 mapping of a Microsoft SQL Server database to . NET classes, and query of the resulting objects using LINQ.

What is LinqConnect?

LinqConnect includes a powerful visual tool for creating entity model that describes your business objects and their mapping to the database. You can design the model from scratch or reverse-engineer an existing database, in which case you will have the classes and the relations with just several clicks.

What is LINQ to SQL?

LINQ to SQL is a component of . NET Framework version 3.5 that provides a run-time infrastructure for managing relational data as objects. Note. Relational data appears as a collection of two-dimensional tables (relations or flat files), where common columns relate tables to each other.


2 Answers

Try DataObjects.NET. I'm one of the DO developers. And my latest activity within that project is to implement LINQ for DataObjects. So I could describe it briefly:

  • Supports almost all LINQ methods except Last/LastOrDefault/Aggregate/Reverse/TakeWhile/SkipWhile etc. and methods that has .NET specific arguments - such as IComparer (nobody supports them).
  • Almost all string and Math methods supported (and you have ability to write your own function mappings!).
  • Complex scenarios with GroupBy\SelectMany\Contains\Single\etc. in subqueries and correlated subqueries are supported.

We have about 1000 tests of LINQ implementation and 99% of them are passed. So I can say that current implementation is close to EF. Some methods do not work with EF, some with our framework. Check this brief description http://www.x-tensive.com/Products/DO/.

like image 176
Alexis Kochetov Avatar answered Sep 27 '22 21:09

Alexis Kochetov


Llblgen seems to have pretty good linq support. Frans has a whole series of blogs posts on his development of it http://weblogs.asp.net/fbouma/archive/2007/09/11/developing-linq-to-llblgen-pro-day-0.aspx

like image 24
Craig Avatar answered Sep 27 '22 20:09

Craig