Entity Framework in the Microsoft NET Framework 4

  • Slides: 24
Download presentation

Entity Framework in the Microsoft. NET Framework 4 and Microsoft Visual Studio 2010 Eric

Entity Framework in the Microsoft. NET Framework 4 and Microsoft Visual Studio 2010 Eric Nelson eric. nelson@microsoft. com http: //geekswithblogs. net/iupdateable http: //twitter. com/ericnel Developer Evangelist Microsoft UK Session Code: DEV 305

Agenda Quick recap of the journey so far Entity Framework 4. 0 Drill Down

Agenda Quick recap of the journey so far Entity Framework 4. 0 Drill Down Lots of demos

Object Relational Mapping Many ORMs out there No clear “winner” = relatively little adoption

Object Relational Mapping Many ORMs out there No clear “winner” = relatively little adoption of ORM Developers waiting on Microsoft Then we shipped two. . . hmmm LINQ to SQL in Visual Studio 2008 ADO. NET Entity Framework in Visual Studio 2008 SP 1

ADO. NET Entity Framework Recap Tools and services to create an Entity Data Model

ADO. NET Entity Framework Recap Tools and services to create an Entity Data Model (EDM) Conceptual to Mapping to Storage Tools and services for consuming an Entity Data Model LINQ to Entities, Object Services and Entity SQL Together they address the “impedance mismatch” Objects in Applications Entity Data Model Conceptual Mapping Storage Rows in Tables

Entity Framework 1. 0 Too many pain points The designer! Model First not supported

Entity Framework 1. 0 Too many pain points The designer! Model First not supported Poor support for Stored Procedures No Pluralization/Singularization Foreign Keys hidden Lazy Loading not supported Missing LINQ Operators vs LINQ to SQL Generated SQL unreadable No support for Plain Old CLR Objects N-Tier difficult

Entity Framework 4. 0 Removing the friction Better Tools and Design Experience More powerful/flexible

Entity Framework 4. 0 Removing the friction Better Tools and Design Experience More powerful/flexible runtime And N-Tier* Persistence Ignorance* Code Only* Note: * Delivered in. NET Framework 4 and a separate download

Better Tools and Design Experience Model First Templated code generation Stored Procedures Pluralization/Singularization Complex

Better Tools and Design Experience Model First Templated code generation Stored Procedures Pluralization/Singularization Complex Types Better delete and search

demo Model First and Templated Code Generation

demo Model First and Templated Code Generation

More powerful/flexible runtime Deferred Loading (aka lazy loading) Foreign Keys surfaced More complete LINQ

More powerful/flexible runtime Deferred Loading (aka lazy loading) Foreign Keys surfaced More complete LINQ implementation Execute. Store. Query Entity. Functions and Sql. Functions Improvements to generated SQL

demo Deferred Loading, Generated SQL

demo Deferred Loading, Generated SQL

Persistence Ignorance First class support for Persistence Ignorance No modifications to your classes!

Persistence Ignorance First class support for Persistence Ignorance No modifications to your classes!

demo Persistence Ignorance

demo Persistence Ignorance

N-Tier Self Tracking Entities

N-Tier Self Tracking Entities

demo N-Tier

demo N-Tier

Code Only Create the database from the classes No model Convention to config

Code Only Create the database from the classes No model Convention to config

demo Code Only

demo Code Only

Entity Framework The designer! No support for Plain Old CLR Objects No Pluralization/Singularization Foreign

Entity Framework The designer! No support for Plain Old CLR Objects No Pluralization/Singularization Foreign Keys hidden Model First not supported Lazy Loading not supported Missing LINQ Operators vs LINQ to SQL Generated SQL unreadable N-Tier difficult Poor support for Stored Procedures

Summary Entity Framework 4. 0 is rather nice! We continue to listen and improve

Summary Entity Framework 4. 0 is rather nice! We continue to listen and improve Resources Entity Framework 4. 0 Resources http: //bit. ly/ef 4 resources Entity Framework Team Blog http: //blogs. msdn. com/adonet/ Entity Framework Design Blog http: //blogs. msdn. com/efdesign/

question & answer

question & answer

Resources www. microsoft. com/teched www. microsoft. com/learning Sessions On-Demand & Community Microsoft Certification &

Resources www. microsoft. com/teched www. microsoft. com/learning Sessions On-Demand & Community Microsoft Certification & Training Resources http: //microsoft. com/technet http: //microsoft. com/msdn Resources for IT Professionals Resources for Developers

Related Content DAT 04 -IS Patterns with the Entity Framework Tue 11/10 9: 00

Related Content DAT 04 -IS Patterns with the Entity Framework Tue 11/10 9: 00 -10: 15 WIA 404 Data Driven Microsoft ASP. NET Web Forms Applications Wed 11/11 17: 3018: 45 DAT 202 What's New in ADO. NET Data Services Mon 11/9, 9: 00 -10: 15

Complete an evaluation on Comm. Net and enter to win an Xbox 360 Elite!

Complete an evaluation on Comm. Net and enter to win an Xbox 360 Elite!

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names

© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U. S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.