entity framework 4 in microsoft visual studio 2010 - ericnel
DESCRIPTION
Session on Entity Framework 4 in Visual Studio 2010 delivered at www.dotnetdevnet.com in Bristol on 3rd Dec.TRANSCRIPT
ADO.NET Entity Framework in Microsoft Visual Studio 2010 and Microsoft .NET Framework 4
Eric Nelson [email protected]://geekswithblogs.net/iupdateable (or http://bit.ly/ericnelson )http://twitter.com/ericnel http://twitter.com/ukmsdn
Developer EvangelistMicrosoft UK
Were you on twitter last Dec?http://twitter.com/ericnel
Agenda
Quick recap of the journey so farEntity Framework 4.0 Drill Down
Lots of demos
Object Relational Mapping
Many ORMs out thereNo clear “winner” = relatively little adoption of ORMDevelopers waiting on MicrosoftThen we shipped two ... hmmm
LINQ to SQL in Visual Studio 2008ADO.NET Entity Framework in Visual Studio 2008 SP1
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”
Conceptual
Mapping
Storage
Entity Data Model
Rows in Tables
Objects in Applications
Entity Framework 1.0Too many pain points
The designer!Model First not supportedPoor support for Stored ProceduresNo Pluralization/SingularizationForeign Keys hiddenLazy Loading not supportedMissing LINQ Operators vs LINQ to SQLGenerated SQL unreadableNo support for Plain Old CLR ObjectsN-Tier difficult
Entity Framework 4.0 Removing the friction
Better Tools and Design ExperienceMore powerful/flexible runtimeAnd
Persistence Ignorance*Code Only*N-Tier*
Note:* Delivered in .NET Framework 4 and a separate download
Better Tools and Design Experience
Model FirstTemplated code generationStored ProceduresPluralization/Singularization Complex TypesBetter delete and search
Model First and Templated Code Generation
demo
More powerful/flexible runtime
Lazy Loading (Deferred Loading in Beta 1 )Foreign Keys surfacedMore complete LINQ implementationExecuteStoreQueryEntityFunctions and SqlFunctionsImprovements to generated SQL
Deferred Loading, Functions, Generated SQL
demo
http://blogs.msdn.com/adonet/archive/2009/08/05/improvements-to-the-generated-sql-in-net-4-0-beta1.aspx
Persistence Ignorance
First class support for Persistence Ignorance No modifications to your classes!
Persistence Ignorancedemo
Code Only
Create the database from the classesNo modelConvention to config
Code Onlydemo
N-Tier
Self Tracking Entities
N-Tierdemo
Entity Framework
The designer!No support for Plain Old CLR ObjectsNo Pluralization/SingularizationForeign Keys hiddenModel First not supportedLazy Loading not supportedMissing LINQ Operators vs LINQ to SQLGenerated SQL unreadableN-Tier difficultPoor support for Stored Procedures
Summary
Entity Framework 4.0 is rather nice!We continue to listen and improveResources
Install VS2010 Beta 2 http://bit.ly/vs2010b2 My blog for EF 4 posts http://bit.ly/ericnelsonChannel 9 Screencasts on EF4 http://bit.ly/ch9ukdevteam Entity Framework 4.0 Resources http://bit.ly/ef4resources Entity Framework Team Blog http://blogs.msdn.com/adonet/Entity Framework Design Blog http://blogs.msdn.com/efdesign/