- The data may span multiple storage systems, each with its own protocols; even applications that work with a single storage system must balance the requirements of the storage system against the requirements of writing efficient and maintainable application code.
- The Entity Framework enables developers to work with data in the form of domain-specific objects and properties, such as customers and customer addresses, without having to concern themselves with the underlying database tables and columns where this data is stored.
- You can work at a higher level of abstraction when you deal with data, and can create and maintain data-oriented applications.
Architecture Components
-
The Entity Framework Data Model is described in the edmx file by three XML based languages.
- CSDL (Conceptual schema definition language) describes the application entities.
- SSDL (Storage schema definition language) describes the database schema.
- MSL (Mapping specification language) describes how the objects map to the tables and columns in the database (Link CSDL and SSDL).
-
**EDM (Entity Data Model):** Consist three main parts- Conceptual model, Mapping and Storage model.
- Conceptual Model: It contains the model classes and their relationships. This will be independent from your database table design.
- Storage Model: It is the database design model which includes tables, views, stored procedures and their relationships and keys.
- Mapping: Mapping consist information about how the conceptual model is mapped to storage model.
-
**LINQ to Entities:** It is a query language used to write queries against the object model.
- It returns entities, which are defined in the conceptual model.
-
**Entity SQL:** It is another query language just like LINQ to Entities.
https://s3-us-west-2.amazonaws.com/secure.notion-static.com/113c0810-7b11-4490-8fb0-a9b377dee542/Untitled
- Object Service: It is a main entry point for accessing data from the database and to return it back.
- It is responsible for materialization, which is process of converting data returned from entity client data provider to an entity object structure.
- Entity Client Data Provider: The main responsibility of this layer is to convert L2E or Entity SQL queries into a SQL query which is understood by the underlying database.
- It communicates with the 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.
EF Core & EF6 Feature by Feature Comparison
Apress - Entity Framework 6 Recipes.pdf
Entity Framework Core Succinctly.pdf
Mastering.Entity.Framework.Core.2.0.pdf