Download - Whats New In Entity Framework 4
![Page 1: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/1.jpg)
Visual Studio 2010and
.NET Framework 4
Training Workshop
Visual Studio 2010and
.NET Framework 4
Training Workshop
![Page 2: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/2.jpg)
What’s New In ADO.NETEntity Framework 4
What’s New In ADO.NETEntity Framework 4
NameTitleOrganizationEmail
![Page 3: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/3.jpg)
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?
![Page 4: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/4.jpg)
Pluralization (v1)Pluralization (v1)
![Page 5: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/5.jpg)
Pluralization (v4)Pluralization (v4)
![Page 6: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/6.jpg)
Model-FirstModel-First
ExistingDatabase
GeneratedEntity Data
Model
DatabaseFirst (v1)
Entity DataModel
GeneratedDatabase
ModelFirst (v4)
![Page 7: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/7.jpg)
Complex TypesComplex Types
1) 1:1 DB Mapping 2) Could get “crowded”
1) Flexibility from DB shape2) Nicely “organized”
VS.
![Page 8: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/8.jpg)
Tooling EnhancementsTooling Enhancements
![Page 9: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/9.jpg)
POCOPOCO
Class Definition
Scalar Property Definition
Navigation Property Definition
Everything
![Page 10: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/10.jpg)
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
![Page 11: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/11.jpg)
Foreign KeysForeign Keys
In theory thislooks really good
In theory this alsolooks really good
This is perfect!
![Page 12: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/12.jpg)
POCOLazy LoadingForeign Keys
POCOLazy LoadingForeign Keys
![Page 13: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/13.jpg)
Model-Defined FunctionsModel-Defined Functions
Umm, I’d rather be using LINQ…
Entity SQLBlock
![Page 14: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/14.jpg)
N-TierN-Tier
DatabaseWeb Service
1) Get Product
2) Make Changes
2) Update Product
Combines power of:1) DataSet2) DTOs
![Page 15: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/15.jpg)
Model-Defined FunctionsN-TierModel-Defined FunctionsN-Tier
![Page 16: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/16.jpg)
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
![Page 17: Whats New In Entity Framework 4](https://reader035.vdocuments.us/reader035/viewer/2022062513/5561e904d8b42a9d068b50fb/html5/thumbnails/17.jpg)