views:

1124

answers:

9

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.

A: 

I had the same issues with EF. I wanted to use it for its mapping but backed out of it due ot the lack of good linq support.

Im not sure what you mean by eager load relationship properties but you can eager load with plain linq-2-sql.

You use LoadOptions.LoadWith<T>(expression).

Sruly
Right, but I'd like to do it at a query level. I might want to query x relationship for one query but not another. But I don't want to have to create a new datacontext just to query once.
Chad Moran
+3  A: 

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

Craig
+2  A: 

OpenAccess http://www.telerik.com/products/orm.aspx

boj
A: 

Signum Framework has a linq provider, http://www.signumframework.com/DatabaseQuery.ashx and has a completely different way of loading entitities. No datacontext.

It only works fine with new applications.

Olmo
+1  A: 

NHibernate with Linq to NHibernate

Tobias Hertkorn
Check out this: http://blog.dataobjects.net/2009/07/preliminary-orm-performance-comparison.html
Alex Yakunin
Hi Alex, thanks for the info - though I have to tell you, all I see there is: NHibernate is way fast enough for my purposes. ;)
Tobias Hertkorn
Performance tests are always subjective. But as I discovered later, "near-complete LINQ support" isn't what can be said about NHibernate as well, and this is much less subjective: http://ormbattle.net
Alex Yakunin
More ormbattle FUD? Disgraceful.
FerretallicA
Providing no facts / references and confusing the users is really disgraceful. I also can say something like "whoow, yet another NH fan is here" - with the same result. So what would be nice is to see at least _some_ tests showing NH supports X, Y and Z features in LINQ, but others do only X and Y. But there are no such tests - moreover, currently NH does not have a table clearly stating what's supported, and what is not (example: http://goo.gl/HjW0 ).
Alex Yakunin
A: 

Genome.

zvolkov
+3  A: 

DataObjects.Net has near-complete LINQ support.

Alexander Nikolaev
DataObjects is heavily flawed. NHibernate would be a much better solution and has better LINQ support.
FerretallicA
Any arguments \ facts \ links to tests?
Alex Yakunin
+5  A: 

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/.

Alexis Kochetov
Also check out our blog http://blog.dataobjects.net/
Alexis Kochetov
+2  A: 

The newest version 3.0 of SubSonic has been copletely rewritten around the use of Linq - http://subsonicproject.com/docs/3.0_Summary

kevinw