views:

145

answers:

1

I'm trying to convince my client to use nhibernate instead of Entity Framework 4. My client have decided to use only Microsoft libraries (including Unity and Enterprise library 5). I don't agree with them (there are so much better logging frameworks/validation layers/ioc etc) but respect their decision.

I've played with EF4 for a couple of days and I do not like it, mainly because of:

  • First of all, all error messages are horrible. I have to spend more time googling what the exceptions actually means than to try fix them.

  • We use POCO's and it was a bit of a hassle to make them work OK with EF4.

  • The mappings files used by nhibernate is so much easier to work with.

Do anyone else have experience with both frameworks and give me more reasons to why they should not use ef4?

Are there any GUI tools or visual studio addins which can be used to generate mapping files / models from a database (stuff like that always helps)

+4  A: 

People have blogged long and in depth responses that can do much better than a few sentances here on this forum. Take a look at the following or do a Google search for "NHibernate vs. Entity Framework 4.0":

A Quest With EF 4.0 (Entity Framework) And NHibernate Part 1:
http://blogs.microsoft.co.il/blogs/berniea/archive/2009/06/09/a-quest-with-ef-4-0-entity-framework-and-nhibernate-part-1.aspx
http://blogs.microsoft.co.il/blogs/berniea/archive/2009/06/09/a-quest-with-ef-4-0-entity-framework-and-nhibernate-part-2.aspx

NHibernate vs. Entity Framework 4.0:
http://ayende.com/Blog/archive/2010/01/05/nhibernate-vs.-entity-framework-4.0.aspx

http://stackoverflow.com/questions/1639043/entity-framework-4-vs-nhibernate

atconway