When should we choose nHibernate over other ORMs?

Viewed 688

I confess, I don't fully grok *Hibernate.

Since micro ORMs like Dapper can be used to address most data access needs, what are the scenarios that require a big gun like nHibernate? What are some examples of situations where nHibernate would shine? To be clear, I don't consider "the ability to switch out your database without changing code" too much of an advantage. In eight years of programming I've never actually had to do that, and it seems like a time wasting idea to begin with.

I'm open to any thoughtful response but here are some examples of questions I have:

  1. When is the query API worth the extra work you have to put into mapping, compared to something like Dapper?
  2. How can you leverage lazy loading in a way that limits development effort and just works?
  3. When is it worth your time to figure out how to batch statements?
  4. In what scenario is the cache system better than, for example, page output caching? Is that only true in non-distributed environments?
  5. How is a mere mortal like me expected to understand how nHibernate would work in a distributed environment? Consider mixing caching, batching, and stateless sessions and thinking about how load balanced web servers would deal with all that.
2 Answers
Related