Whats New In Entity Framework 4
-
Upload
kulveersingh -
Category
Technology
-
view
3.654 -
download
1
description
Transcript of Whats New In Entity Framework 4
Visual Studio 2010and
.NET Framework 4
Training Workshop
Visual Studio 2010and
.NET Framework 4
Training Workshop
What’s New In ADO.NETEntity Framework 4
What’s New In ADO.NETEntity Framework 4
NameTitleOrganizationEmail
ObjectivesObjectives
• How has the EDM toolset been enhanced?• What alternative development styles are enabled?
• How is the EF easier to use?• How is it more fully-featured?• Does EF 4 address any issues you had with it?
Pluralization (v1)Pluralization (v1)
Pluralization (v4)Pluralization (v4)
Model-FirstModel-First
ExistingDatabase
GeneratedEntity Data
Model
DatabaseFirst (v1)
Entity DataModel
GeneratedDatabase
ModelFirst (v4)
Complex TypesComplex Types
1) 1:1 DB Mapping 2) Could get “crowded”
1) Flexibility from DB shape2) Nicely “organized”
VS.
Tooling EnhancementsTooling Enhancements
POCOPOCO
Class Definition
Scalar Property Definition
Navigation Property Definition
Everything
Lazy LoadingLazy Loading
1) Get Product
2) Access Category
Database
Get Product1) Get Product
2) Access Category
Get Category
3) Get Category
Database
Get Product
Get Category
Exp
licit
Imp
licit
Foreign KeysForeign Keys
In theory thislooks really good
In theory this alsolooks really good
This is perfect!
POCOLazy LoadingForeign Keys
POCOLazy LoadingForeign Keys
Model-Defined FunctionsModel-Defined Functions
Umm, I’d rather be using LINQ…
Entity SQLBlock
N-TierN-Tier
DatabaseWeb Service
1) Get Product
2) Make Changes
2) Update Product
Combines power of:1) DataSet2) DTOs
Model-Defined FunctionsN-TierModel-Defined FunctionsN-Tier
SummarySummary
• The EDM tooling has been enhanced…• Model-First• Complex Types
• The EF runtime is more fully featured…• POCO• Lazy Loading• Foreign Keys• Model-Defined Functions• N-Tier