Soe Lwin Htoo
Soe Lwin Htoo

Reputation: 51

Code First Entity Framework Or NHibernate

I'm pretty new to Code First EF 4.1 and NHibernate. I need to develop a ORM that must have following features.

  1. Perform CRUD with composite key
  2. Use Custom SQL Statement for some case.
  3. Can change connection at run time.
  4. Can Log SQL Statement before or after execution.
  5. Need to support Both MS SQL and Oracle.

I'm a bit confuse which one to choose. Please kindly advice.

Upvotes: 3

Views: 4405

Answers (4)

Dennis Doomen
Dennis Doomen

Reputation: 8889

It might be a bit late, but I've just published a more recent comparison of NHibernate 3.x and Entity Framework 5 and 6. http://www.dennisdoomen.net/2013/03/entity-framework-56-vs-nhibernate-3.html

Upvotes: 2

Diego Mijelshon
Diego Mijelshon

Reputation: 52725

Well, here's a general comparison of features:

.net ORM Comparison

Regarding your needs, both EF and NH support 1, 2, 3 and 5.

Logging is a different story. EF has absolutely nothing out of the box. NH logs everything, and you can choose diffent levels, loggers, etc.

Upvotes: 4

Sriram
Sriram

Reputation: 838

I would go for Nhibernate. It supports all these features and is more battle-tested than EF at this point in time.

Upvotes: 3

danyolgiax
danyolgiax

Reputation: 13086

I use NHibernate and I think you can achieve all of your request with it.

Try look here for more info:

Deciding between NHibernate vs Entity Framework?

Upvotes: 3

Related Questions