When I first started using NHibernate, it had not supported Linq. After familiarizing myself with Criteria API, QueryOver came up and saved tons of error-prone code. At that time, Nhibernate had very little support for LINQ.
The main advantage of LINQ is that you are using same API for both ILists, IDictionaries, other 3rd party libs that supports it and NHibernate. You do not have to master another API, just LINQ is enough for your everyday jobs. Moreover, using LINQ with Nhibernate does not do in-memory operations, in fact its engine works similar to QueryOver and generates SQLs with respect to your LINQ directives. The disadvantage of using LINQ in NHibernate is, you may not feel comfortable with it if you are accustomed to QueryOver API, and LINQ engine might be not as perfect as QueryOver today. I know some people experienced hard time doing complicated stuff with LINQ. %80 of work I did with NHibernate consist of QueryOver API, but currently I force myself to use LINQ instead of it. On Wed, Jan 23, 2013 at 1:53 PM, Pete Appleton <[email protected]>wrote: > Hi folks, > > With all the discussion about LINQ recently, I'm just wondering which > API other people prefer for NHibernate. We've standardised on > QueryOver, which I quite like in general but it seems that other people > are moving towards LINQ - is this the case, and if so then why? Our > choice of QueryOver is motivated by (1) avoiding the 'magic strings' in > HQL (or SQL!), and (2) making a clear-cut distinction between DB access > (QueryOver) vs in-memory operations (LINQ extensions). What do other > people prefer, and why? > > Cheers, > > Pete > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- Sadullah Ceran, [image: LinkedIn] <http://www.linkedin.com/in/sadullahceran> [image: Twitter] <http://www.twitter.com/sadullahceran> [image: Facebook]<https://www.facebook.com/ceran> -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
