Entity Framework architectural
components
Entity Framework comprises the following components:
•
The Entity Data Model
•
LINQ to Entities
•
Entity Client
•
Entity SQL
•
The Object Services Layer
Introducing the ADO.NET Entity Framework
[
12
]
Note that the
Conceptual Model Layer
,
Mapping Layer
, and
Logical Model Layer
are all parts of the EDM. The following image illustrates the layers of the ADO.NET
Entity Framework and how they are related to each other:
Entity SQL
The Conceptual Model Layer (Defined using .CSDL files)
LINQ to Entities
The Mapping Layer (Defined using .MSL files)
The Logical Model Layer (Defined using .SSDL files)
Database
Object Query
Entity SQL
Object Services
Entity Data Model
ADO.NET Entity Framework: the architectural components
We will now discuss each of the components of the Entity Framework technology
stack in the following sections.
The Entity Data Model
The
Entity Data Model
(
EDM
), an extended entity relationship model, is the core of
Entity Framework. You can generate an EDM using the
EDMGen.exe
command-line
tool or using the ADO.NET EDM Designer—a new Visual Studio template. We will
discuss how an EDM can be generated from a relational schema in the next chapter.
For additional information, please refer to
http://msdn.microsoft.com/en-us/
library/bb896270(v=vs.110).aspx
.
Chapter 1
[
13
]
The following image illustrates where exactly the EDM fits in:
The ADO.NET Entity Data Model
The Relational Data Store
.NET Objects or collection of .NET
Objects
The Entity Data Model
The EDM abstracts the logical or the relational schema and exposes the conceptual
schema of the data using a three-layered approach. It comprises the following layers:
•
The Conceptual Model Layer or the Conceptual Data Definition Language
Layer (C-Space)
•
The Mapping Layer or the Mapping Schema Definition Language layer
(C-S Space)
•
The Storage Layer or the Logical Layer or the Store Space Definition
Language Layer (S-Space)
The following image illustrates the layers of the EDM:
The Mapping Layer or the C-S Mapping Layer (MSL)
The Logical or the S-Space (SSDL)
Comprises of Tables, Stored Procedures, Views and Functions
Queried using ADO.NET Data Providers
(SQLConnection, SQLCommand, SQLDataReader, SQLDataAdapter, etc. using T-
SQL or, using PL-SQL)
The ADO.NET Entity Data Model Layers
The Conceptual or the C-Space (CSDL)
Comprises of EntityContainer, EntitySets, AssociationSets, AssociationTypes,
EntityTypes, Relationships and Functions
Queried using EntitySQL or ESQL (EntityConnection, EntityCommand,
EntityDataReader)
The Entity Data Model layers
Introducing the ADO.NET Entity Framework
Do'stlaringiz bilan baham: |