views:

81

answers:

1

I have not found a clear comparison of what is supported with the NHibernate 3.0 LINQ Provider compared to using the QueryOver syntax. From the surface, it seems like two large efforts into two very similar things.

What are the key trade offs to using each?

+1  A: 

LINQ and QueryOver are completely different query methods, which are added to the ones that existed in NHibernate 2 (Criteria, HQL, SQL)

QueryOver is meant as a strongly-typed version of Criteria, and supports mostly the same constructs, which are NHibernate-specific.

LINQ is a "standard" query method, which means the client code can work on IQueryable without explicit references to NHibernate. It supports a different set of constructs; it would be hard to say if there are more or less than with QueryOver.

My suggestion is to learn all the supported query methods, as each use case is different and some work better with one, some work better with other.

Diego Mijelshon
Fetching and Caching seem to be supported with the LINQ Provider, I'm just wondering if there would be any similar technical walls (join scenarios, etc) that I could run into.
dotjosh
LINQ doesn't yet support left joins, for example.
Diego Mijelshon
Exactly the kind of thing I was wondering, if anyone could contribute to this list I'm sure it would be helpful to myself and others.
dotjosh