close

Вход

Забыли?

вход по аккаунту

код для вставкиСкачать
Jeff Derstadt
Senior Development Lead
Microsoft Corporation
[email protected]
Entity Framework Basics
What’s New in .NET 4.0
Level of Abstraction
ODBC
OLE DB
Typed
DataSet
RDO
ADO
ADO.NET
(SqlClient)
DataSet
DAAB
Entity
Framework
class Customer { … }
from c in ctx.Customers
where c.Name.StartsWith(“A”)
select c
C1
C1
C2
C2
C3
C3
Model
Entity Framework
Change Tracking
LINQ Translation
Materialization
Update Pipeline
CID
DB
Name
CID
Company
Photo
StartDate
Goal: Simple and seamless data access for the .NET
platform
Better layering
Better re-use of existing knowledge and assets
EDM – Entity Data Model
An abstract model for defining entities and relationships
Includes schema and mapping
Store Schema Definition (SSDL)
Conceptual Schema Definition (CSDL)
Mapping Schema between the two (MSL)
Entity Framework
An implementation of EDM and an ORM layer on top
A framework for using entities over data
Database First (VS 2008 and .NET 3.5 SP1)
DB
Model
Design time
Design time
Code
why? it already exists, or
you want low level control
over the database
Model First (VS 2010 and .NET 4.0)
DB
Model
Design time
Design time
Code
why? you want separation
from code and database in
a declarative format
Code First (Entity Framework Feature CTP3)
DB
Model
Runtime
Runtime
Code
why? primarily focused on
code shape, database is an
implementation detail
Model-first development
Automatic pluralization
Lazy loading
POCO class support
T4 Code Generation
Template customization
ObjectSet/IObjectSet
Foreign keys in models
Virtual SaveChanges
ExecuteStoreQuery
ExecuteStoreCommand
More LINQ operator
support
There’s more!
Self-tracking entities
SQL generation
improvements
ObjectStateManager
control
WPF designer integration
SPROC import
improvements
Model defined functions
Code-Only development
(Feature CTP)
For more Information please contact
Jeff Derstadt
Senior Development Lead
[email protected]
425-706-9683
Microsoft Corporation
1 Microsoft Way
Redmond, WA 98052 USA
http://msdn.microsoft.com/data
Gives us feedback
http://blogs.msdn.com/adonet
http://blogs.msdn.com/efdesign
1/--страниц
Пожаловаться на содержимое документа