Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADO.NET Entity Framework vs NHibernate [closed]

So the ADO.NET Entity Framework has gotten a little bit of bad press (in the form of blog entries and a petition) but I don't want to rush to judgement. I'm limited in time for experimentation but I was wondering has anyone worked with it yet with more empirical feedback?

Finally, what are thoughts on using NHibernate which has been around for a long time and may be more mature than the ADO.NET Entity Framework.

like image 789
t3rse Avatar asked Aug 20 '08 14:08

t3rse


2 Answers

NHibernate may be more mature. That does not necessarily mean it is a "better" solution. Having used it at my job for some time, I would personally prefer to use almost anything than NHibernate (even straight SQL, if migration were remotely feasible). The number of error messages thrown by NHibernate that don't mean anything (or that do mean something but should never occur) is absolutely staggering, as are some of its default behaviours (such as flushing the session once for each object returned in a Find).

Personally, when I have a choice, I use LINQ to SQL for all database work.

like image 122
TheSmurf Avatar answered Oct 23 '22 10:10

TheSmurf


If zero configuration is main advantage of SubSonic you can look at Fluent nHibernate or Entity Framework Code-First

UPDATE from Răzvan Panda: Fluent NHibernate has been mostly made obsolete by inclusion in NHibernate itself of mapping by code, see: notherdev.blogspot.ie/2012/02/

like image 12
Regfor Avatar answered Oct 23 '22 10:10

Regfor