views:

580

answers:

1

Apart from the fact that it’s open source and mature, what are the differentiating factors that separate nhibernate from rest of the .net ORM frameworks like Subsonic, ADO.NET Entity Framework etc?

Better put, why should I choose nhibernate over other .net entity frameworks?

+3  A: 

The biggest reason is probably that nHibernate supports persistence ignorance; your entities can be plain old CLR objects (no base class). It also supports unit of work (updates are automatically tracked and batched) which Subsonic does not support. Also, Entity framework does not support implicit lazy loading (when you want to access Order.OrerItems, you have call Order.OrerItems.Load()). It forces you to think about lazy loading, but also pollutes your buisness logic with infrastructure concerns.

Robin Clowers
so are you in favor of Nhibernate or against? "It forces you to think about lazy.." is ambiguous.
CmdrTallen
I signed the EF vote of no confidence; I think Nhibernate is a much better tool. It does force you to think about lazy loading, and I think you should only think about it when it matters.
Robin Clowers