views:

68

answers:

1

Possible Duplicates:
ADO.NET Entity vs NHibernate
nhibernate, entity framework, active records or linq2sql

Hi all, I'm going to choose a ORM tool for the new project. Just wondering which one is better? Entity Framework or NHibernate? Please give some suggestions according to your own experience. Thanks

A: 

It depends on which version of Entity Framework. The one in .NET 4 is far superior to the frankly awful version that was with .NET 3.5. If you're not on .NET 4 i'd recommend NHibernate without a doubt. Entity Framework does support stored procedures where it will generate the classes for the return type which is nice if your DBA's are big fans of stored procs like ours are. I've read some stuff about NHibernate doing more efficient queries with regards to counting etc, but Entity Framework has nicer tooling and better LINQ support. It can also support putting multiple tables into a singlge class which I don't think many ORMs can do.

Wrapping up I don't think there is much in it. Give both a whirl and see which one takes your fancy.

Dylan
Thanks Dylan, I am still on .Net 3.5 so I will give NHibernate a go. I think once I familar with NHibernate, it shouldn't be too hard to switch to EF. In the end of day, both of them are ORM tool and the concepts are the same. Thanks again.