If my job was to retrieve data from the database I would never choose NHibernate!
DataSets and DataReader are much more useful for this.
But my job is not to retrieve data from the database. It is to build a system that solves a complex problem.
If my job was to build a system that solves a complex problem I would never choose NHibernate!
I would choose an approach that can handle complex problems. I would choose to build a Domain Model!
If I choose to build a Domain Model I would make sure that it was built to have a long lifespan.
If I wanted a long lifespan for my Domain Model I would make sure we only need to change it when the business domain changes, not when software technologies for data access and other such concerns change.
To give my Domain Model a long lifespan I would base it on the technology that is the least likely to change. This would be something that have not changed in a long time and have a lot of other software built on it so it cannot change for a long time.
The way basic classes work in object models have not changed since the ideas were formed in the 1960s. In the Microsoft world, classes/objects have not changed since Microsoft.NET framework 1.0 was introduced. The whole Microsoft.NET framework is built on Common Language Runtime (CLR) classes/objects.
I would base my Domain Model on just basic classes, also known as Plain Old CLR Objects (POCO). PCOO objects are classes that does not inherit from or are in any way are associated with anything “special” such as a Microsoft DataSet base class. This way POCO classes can stay 100% focused on business problems and don’t have to change when data access technologies change.
Some of the POCO objects in the Domain Model would have to be saved to a database. In order to do this and not involve any of the technology to do it in the Domain Model I would have to use Persistence Ignorance (PI). PI means that the object in the Domain Model have no idea how they are being saved and loaded from the persistent medium (the database).
To use PI I would have to use an existing persistence framework that supports PI or build my own data access framework that supports PI.
I would choose to use an existing persistence framework to save time. I would want to use the framework that does not depend on a small vendor and does not infer extra cost on the project. I would want to use a framework that are used in a lot of other systems and have a lot of documented credibility.
The only framework that currently matches these criteria is NHibernate.
I do not choose to use NHibernate but I use it as a consequence of my other more important choices!