ADO. NET Entity Framework is the official ORM solution of Microsoft. Therefore, we can't help but remember the famous ORM solution in. NET Program Design-nhib.pdf from the open source. With the impressive appearance of VS2010, how will the new ADO. NET Entity Framework be presented to everyone?
What problems does Entity Framework solve?
1. Provide an O/R Mapping Solution
2. Improve the abstraction degree of Application-Level Domain
3. You can query a variety of databases using a single LINQ to Entity or Entity SQL statement.
4. Use EDM (Entity Data Model) to unify all Data models, such as Entity Framework, Data Service, and Dynamic Data.
All data models such as Reporting Service, Analysis Service, and Portal can be described using EDM, and all data can be queried using consistent query syntax.
- Which of the following technologies does. NET currently use EF?
ADO. NET Data Services
. Net ria Servives
Silverlight
ADO. NET Dynamic Data
ASP. net mvc Framework
ASP. NET & WinForm
Entity Data Model Definition Member
Entity Framework
Storage Model (Logical Model)
# The purpose is to normalize Entity and Relationships into a Table database with foreign key constrains in a relational database.
# Store schema definition language file (SSDL)
Conceptual Model
# Define Entities and Relationships
# Conceptual schema definition language file (CSDL)
Mappings
# Define the correspondence between Storage and Conceptual Model
# Mapping specification language file (MSL)
Object Services
# It is a part of EF, System. Data. Entity. dll.
# Two namespaces must be referenced: System. Data. Objects & System. Data. Objects. DataClass
The two namespaces contain a group of service classes. The core classes are ObjectContext and ObjectQuery.
# Serves as an intermediary service for Entity Types jobs in EDM
# Query, Insert, Update, and Delete
ObjectContext object
# Instance of Entities Type in EDM
# Object type interaction for Entity Data
# The ObjectContext category includes:
Connection to database
MetadataWorkspace object
ObjectStateManager object
ObjectQuery object
# The ObjectQuery generic category indicates the query that returns zero or multiple strong classes of Entity Objects.
# An Object Query always belongs to an existing Object Context, that is, before using ObjectQuery, you must first create an Objcet Context.
# Because Object Context provides the Connection lines and Metadata information required to construct and execute the query.
EF (EDM)
LINQ to Entity
Entity SQL
Query Builder Methods