Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the Entity Framework differ from a normal ORM?

Like the title says: Why do people including Microsoft say ORM is only a feature in the Entity Framework? What is different between it and a typical ORM? For me, EDM is same as XMl mapping from nHibernate. Why does Microsoft say this is not same?

like image 475
szkra Avatar asked Feb 19 '26 23:02

szkra


1 Answers

The one thing that sets apart Entity Framework from most (if not all) other ORM's out there is the fact that is has three layers - a storage model which is the physical database model (tables, views etc.), a conceptual model which represents your objects in your app, and a mapping layer between those two.

You can do mappings in EF where a single .NET object maps onto several database tables, and other things. You can also map object inheritance hierarchies into several ways of representing those in database tables.

NHibernate can do something similar, definitely in the inheritance area (not sure about the mapping one .NET object to multiple tables).

Almost all other ORM's are just simply a more or less glorified 1:1 mapping of database tables into .NET objects - no mapping and modelling capabilities.

like image 85
marc_s Avatar answered Feb 22 '26 14:02

marc_s



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!