Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What differentiates Nhibernate from other ORM’s?

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?

like image 870
Cherian Avatar asked Oct 30 '25 23:10

Cherian


1 Answers

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.

like image 178
Robin Clowers Avatar answered Nov 01 '25 13:11

Robin Clowers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!