Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nHibernate vs Entity Framework with Oracle backend

Now that Oracle supports EF officially (at least in Beta), EF looks like a reasonable choice to work with Oracle database. In the other hand, NHibernate seems very suited for the same job.

Does anyone has experience with both? Any recommendation for someone who wants to get started? Which one seem to make most sense on the long run?

like image 775
E. Jaep Avatar asked Mar 29 '11 14:03

E. Jaep


1 Answers

EF is still a new born in regards of object persistance. It uses an underlying object inheritance which some times could make you lose your inheritance possibility while designing. This could have been fixed with the new version of EF, and still, it lacks the flexibility of NHibernate.

NHibernate is a port to .NET of Hibernate in JAVA. It is likely about the same maturity now, if I remember correctly from version 3.0 of NHibernate. It uses either Attribute mapping, XML mapping or you may also use Fluent NHibernate or ConfORM, which allow you to map your objects in an object-oriented and optionally convention-based manner.

Though EF4 seems to deliver more performance in some ways, my preference resides still with using NHibernate, as it has proved better flexibility with foreign database engines other than SQL Server, IMHO.

Please, see for yourself:

  1. NHibernate vs. Entity Framework 4.0 (Ayende);
  2. Entity Framework 4 vs NHibernate (SO);
  3. EF4 compared to NHibernate;
  4. Performance comparison of nHibernate and Entity Framework.
  5. .net ORM Comparison (SO)
like image 186
Will Marcouiller Avatar answered Nov 10 '22 07:11

Will Marcouiller