Now I’m not an expert in either of these techs. I have a nice framework for unit of work / repository built with NHibernate. Works pretty well. I use FluentNhibernate to do the mappings. Works well. Takes very little code to get going with a DB back OO model.
So why swap?
Linq. In Entity Framework you get much better linq support.
Visibility. I have no idea what's really happening with NHibernate….its a cloud of mystery most of the time. You have to read all the blogs, mailing lists, etc to know what's going on.
So, EF 4.0 looks like pretty good…. it has reasonably good support for mapping POCOs. Wrapping UnitOfWork and Repository around it seems ok.
Only thing I haven’t liked too much is having to explicitly load lazy loading entities.
So…. am I sane? is EF the way to go? or is NHibernate going to suddenly release the next generation of coolness? Is there any other major gotchas of using EF over NHibernate?