views:

229

answers:

3

Fluent NHibernate or NHibernate, Which one should we prefer for linq support?

A: 

I prefer NHibernate and its Linq library. I have no problem with basic type of queries, but for complicated ones it does not support generally.

NetSide
-1 as explained in the other answers, FNH and NHLinq have very different purposes. There is no choosing one or the other. This answer is plainly wrong.
Mauricio Scheffer
What a bad answer, and accepted too. Sheesh. For the record, Fluent NHibernate has nothing to do with querying what-so-ever.
James Gregory
+10  A: 

Fluent NHibernate is from Configuration and Linq is for querying. They do different things and you can use both at the same time. Fluent NHibernate is not a replacement for NHibernate or Linq but merely a helper library that helps you configure NHibernate in code rather than using XML files.

Geoff
Still - which one You would choose? :o)
Arnis L.
@Arnis: both. It's what I do.
Rafael Belliard
+3  A: 

When you use NHibernate you create mappings for your objects and the queries (LINQ) to CRUD those objects. NHibernate uses XML mapping files. Fluent NHibernate simply generates those mapping files for you based on conventions or any other of the possible ways. So, it does not matter if you use FNHib or not. You can still query your objects with Linq, Hql, Criteria or QueryOver and you are still goin to use NHibernate.

mynkow