Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the...

9
Entity Framework Overview

Transcript of Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the...

Page 1: Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.

Entity Framework Overview

Page 2: Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.

Entity Framework

• A set of technologies in ADO.NET that support the development of data-oriented software applications

• A component of the .NET Framework starting with version 3.5

• Enables developers to work with data in the form of domain-specific objects and properties rather than data represented in relational database form

Page 3: Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.

Application Parts

• Domain (Conceptual) model – defines the entities and relationships in the system

that is being modeled• Logical (Storage) model– normalizes the entities and relationships into tables

with foreign key constraints• Physical model– addresses the capabilities of a particular data engine

by specifying storage details such as partitioning and indexing.

Page 4: Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.

Example Storage Model

Page 5: Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.

Example Conceptual Model

Page 6: Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.

Entity Framework

• The Entity Framework creates the mapping between the conceptual model (objects) and the storage model (data)– expressed in XML-based schemas and defined in

files that have corresponding name extensions• Conceptual schema definition language (CSDL) defines

the conceptual model.• Store schema definition language (SSDL) defines the

storage model• Mapping specification language (MSL) defines the

mappings between the storage and conceptual models.

Page 7: Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.

Mapping Between Models

Page 8: Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.

Accessing and Changing Entity Data

• The Entity Framework provides the following ways to query a conceptual model and return objects:– LINQ to Entities• Query syntax• Method syntax

Page 9: Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.

Entity Framework Architecture