Saturday 12 July 2014

Architecture of Entity Framework



EDM (Entity Data Model): EDM consist three main parts- Conceptual model, Mapping and Storage model.

Conceptual Model: Conceptual model is your model classes and their relationships. This will be independent from your database table design.

Storage Model: Storage model is your database design model which includes tables, views, stored procedures and their relationships and keys.

Mapping: Mapping consist information about how your conceptual model is mapped to storage model.

LINQ to Entities:LINQ to Entities is query language used to write queries against the object model. It returns entities which are defined in the conceptual model. You can use your LINQ skills here.

Entity SQL:Entity SQL is again a query language same as LINQ to Entities. However it is little more difficult than L2E and also developer need to learn it separately.

Object Service:Object service is a main entry point for accessing data from database and to return it back. Object service is responsible for materialization which is process of converting data returned from entity client data provider (next layer) to an entity object structure.

Entity Client Data Provider:The main responsibility of this layer is to convert L2E or Entity SQL queries into SQL query which is understood by underlying database. It communicates with ADO.Net data provider which in turn sends or retrieves data from database.

ADO.Net Data Provider:This layer communicates with database using standard ADO.Net.

No comments:

Post a Comment