Поделиться через


Entity Framework Features

An Entity Framework application requires creating a conceptual model defining the entities and relationships, a logical model that represents the underlying relational model, and the mappings between the two. A programmable object model is then generated from the conceptual model.

The following features and components of the Entity Framework work together to provide an end-to-end programming environment.

  • The Entity Data Model (EDM) is the centerpiece of the Entity Framework. It specifies the design schema, which is used to build the programmable classes used by application code. Storage structures for persisting data are represented a storage schema, and a mapping specification connects the design schema with the storage schema. Conceptual entities can be materialized as objects or can be read in serialized form using a data reader. Developers can extend these objects as needed to support varying application needs. For more information, see Entity Data Model.

  • The Object Services component enables programmers to work with the common language runtime (CLR) classes generated from the conceptual model. It also provides infrastructure support for the Entity Framework, providing services such as state management, change tracking, identity resolution, loading and navigating relationships, propagation of object changes to database modifications, and query support for Entity SQL. For more information, see Object Services (Entity Framework).

  • LINQ to Entities provides Language-Integrated Query (LINQ) support for querying entities. LINQ to Entities enables developers to write queries against the database using one of the supported .NET Framework programming languages such as Visual Basic or Visual C#. For more information, see LINQ to Entities.

  • Entity SQL is a SQL-like storage-independent language, designed to query and manipulate rich object graphs of objects based on the Entity Data Model (EDM). For more information, see Entity SQL Language.

  • The EntityClient provider extends the ADO.NET provider model by accessing data in terms of conceptual entities and relationships. It executes queries that use Entity SQL. Entity SQL provides the underlying query language that enables EntityClient to communicate with the database. For more information, see EntityClient Provider for the Entity Framework.

  • The ADO.NET metadata component manages metadata for the design time and runtime needs of the Entity Framework. All metadata associated with models and mappings are exposed through metadata interfaces that are independent of the mechanism used for metadata storage. The current storage mechanism uses file that are based on three XML dialects: conceptual schema definition language (CSDL), store schema definition language (SSDL), and mapping specification language (MSL). For more information, see ADO.NET Metadata.

  • The Entity Framework includes an evolving set of tools that generate mappings and partial classes that represent the entities in the conceptual model. For more information, see Entity Data Model Tools.

  • The Entity Framework includes an updated SqlClient Data Provider that supports canonical command trees. For more information, see .NET Framework Data Provider for SQL Server (SqlClient) for the Entity Framework.

Architectural Diagram

The following diagram shows how the various user accessible programming interfaces relate in the Entity Framework. A downward arrow indicates a query against the data source, and an upward arrow indicates returned data. Object Services generates a canonical command tree that represents a LINQ to Entities or Entity SQL operation against the conceptual model. The EntityClient provider transforms this canonical command tree, based on the EDM, into a new canonical command tree that is an equivalent operation against the data source.

Entity Framework Architectural Diagram

See Also

Concepts

Entity Framework Terminology
Introducing the Entity Framework

Other Resources

Feature Reference (Entity Framework)
Getting Started (Entity Framework)