EF – One of Microsoft’sORMs - HAAGA

Download Report

Transcript EF – One of Microsoft’sORMs - HAAGA

EF – One of Microsoft’s ORMs
Entity Framework – EF (ORM)
Juhani Välimäki 21.5.2013
OOP - Object-oriented Programming
: Member
: Idea
Member will have Ideas collection, Idea will get Members
collection and it is enough to add to one of these, the EF
maintains the other automatically. The EF context must know
both objects = they must be fetched from same context object
or the new created object must be attached
to the same EF data context (object)
In the web application
- Entity objects from EF
- Many-to-Many
relatioships are ok
- Pure join tables
disappear.
- EF manages many-tomany relationships
Microsoft Entity Framework – EF
= one of Microsoft’s ORMs
(EF data model description file .edmx)
ORM –
Object Relational Mapping
E.g.
Hibernate, NHibernate,
Java Persistence API, …
Driver, adapter etc. libraries In the database
- Tables
- Only 1-to-Many
DBMS, e.g. MS SQL
relatioships
Server, Oracle, IBM DB2
- Pure join tables exist for
linking many-to-many
RDB
RDB – Relational Database