150 likes | 289 Views
SAC-812T. Creating immersive data experiences with Entity Framework. Jeff Derstadt jeffders@microsoft.com Microsoft. David DeWinter davidewi@microsoft.com Microsoft. Session Objectives and Takeaways. Objectives Understand Entity Framework & Code First capabilities
E N D
SAC-812T Creating immersive data experiences with Entity Framework Jeff Derstadt jeffders@microsoft.com Microsoft David DeWinter davidewi@microsoft.com Microsoft
Session Objectives and Takeaways • Objectives • Understand Entity Framework & Code First capabilities • Understand how EF fits into Windows 8 • Understand upcoming EF features
Versions • EF 1 • Shipped with .NET 3.5 SP1 • Features: • Database First Workflow • Basic ORM Support • EF 4 • Shipped with .NET 4 / VS 2010 • Features: • Model First Workflow • POCO, Lazy Loading, T4 Code-Gen, FKs Working Horse Edition • EF 4.1 • Standalone Release building on .NET 4 • Features: • Code First Workflow • Simplified DbContext API Magic Unicorn Edition EF vNext vNext Edition ?
Developer Workflows Designer Centric Code Centric New Database • Model First • Create .edmx model in designer • Generate database from .edmx • Classes auto-generated from .edmx • Code First • Define classes & mapping in code • Database auto-created at runtime Existing Database • Database First • Reverse engineer .edmx model • Classes auto-generated from .edmx • Code First • Define classes & mapping in code(Reverse engineer tools available)
demo Entity Framework
Migrations • Event • Id:int • Name: 128 • Description: max • When: datetime • Event • Id: int • Name: max • Description: max • When: datetime ChangeColumn( "Events", "Name", ca => ca.String( maxLength:128)); code change update- database add- migration
demo EF Migrations
Enabling Windows 8 Data Tier Web Project Win8 Clients odata DB HTML5/JS odata WCF Data Service Data Model odata Azure XAML/.NET odata odata
demo EF EnabledWindows 8 Experiences
EF vNext • Enums • Spatial Data • Migrations • Table-Valued Functions • Automatic compiled LINQ queries • Query optimization improvements • Sprocs with multiple result sets • Multiple Diagram Support • Database Project integration
Related Sessions • Your devices + OData + Windows Azure = happiness Friday @ 12:30 pm in ACC Ballroom D • OData Futures: creating the web of data Friday @ 2:00 pm in ACC Ballroom D
Related Resources • Learning Resources • Main MSDN Page: http://msdn.com/ef • ASP.NET + EF Tutorials: http://www.asp.net/entity-framework/tutorials • Blogs • ADO.NET Team Blog: http://blogs.msdn.com/adonet/ • EF Design Blog: http://blogs.msdn.com/efdesign/ • Feature Voting: http://ef.mswish.net • Releases • EF Power Tools: http://tinyurl.com/efptctp1 • June 2011 Data CTP: http://tinyurl.com/junectp
thank you Feedback and Questions: http://forums.dev.windows.com Session Feedback: http://bldw.in/SessionFeedback
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.