I have NHibernate-based applications in production, and although it is better than most DALs, I am in a situation where I never recommend anyone use NHibernate. The sophistication that is required to work with a session to make any advanced application is simply absurd. For simple applications, NHibernate is very trivial for an enterprise application, there is no complexity in the diagrams.
At this point, I came to the decision to allow access to data with 3 different options depending on the application, using a document database (in particular, Raven at present) for a full-scale application, for medium volumes of data access using LinqToSql and for trivial access I really use raw ADO.NET connections with great success.
For reference, these statements after I spent 2 years developing using NHibernate, and every time I ever felt like I fully understood NHibernate, I came across some kind of new restriction or giant monkey key, which i need to do deal with. It also led me to realize that I started developing applications with respect to NHibernate, which is one of my main reasons for using ORM so that the design of applications is not database driven.
Not having to deal with session management with NHibernate complexity, I was one of the biggest moments to upgrade to RavenDB. With Raven, you need very little session management, unless you are performing extreme performance optimizations or working with batch actions.
Chris marisic
source share