110 likes | 511 Views
Introducing Entity Framework 4.0. Jeff Derstadt Senior Development Lead Microsoft Corporation jeffders@microsoft.com. Agenda. Entity Framework Basics What’s New in .NET 4.0. Data Access. Object Relational Mapping. SQL. Level of Abstraction. Typed DataSet. ODBC. Entity Framework.
E N D
Introducing Entity Framework 4.0 Jeff Derstadt Senior Development Lead Microsoft Corporation jeffders@microsoft.com
Agenda • Entity Framework Basics • What’s New in .NET 4.0
Data Access Object Relational Mapping SQL Level of Abstraction Typed DataSet ODBC Entity Framework RDO DataSet OLE DB ADO DAAB ADO.NET (SqlClient)
Entity Framework in a Nutshell class Customer { … } C1 C1 from c in ctx.Customers where c.Name.StartsWith(“A”) select c C2 C2 C3 C3 Entity Framework Model Change Tracking LINQ Translation Materialization Update Pipeline DB
Goal: Simple and seamless data access for the .NET platform Better layering Better re-use of existing knowledge and assets EDM – Entity Data Model An abstract model for defining entities and relationships Includes schema and mapping Store Schema Definition (SSDL) Conceptual Schema Definition (CSDL) Mapping Schema between the two (MSL) Entity Framework An implementation of EDM and an ORM layer on top A framework for using entities over data Entity Framework in a Nutshell
Database First (VS 2008 and .NET 3.5 SP1) Getting Started why? it already exists, or you want low level control over the database DB Model Design time Design time Code • Model First (VS 2010 and .NET 4.0) why? you want separation from code and database in a declarative format DB Model Design time Design time Code • Code First (Entity Framework Feature CTP3) why? primarily focused on code shape, database is an implementation detail DB Model Runtime Runtime Code
Model-first development Automatic pluralization Lazy loading POCO class support T4 Code Generation Template customization ObjectSet/IObjectSet Foreign keys in models Virtual SaveChanges ExecuteStoreQuery ExecuteStoreCommand More LINQ operator support What’s New in .NET 4.0 There’s more! • Self-tracking entities • SQL generation improvements • ObjectStateManager control • WPF designer integration • SPROC import improvements • Model defined functions • Code-Only development (Feature CTP)
Thank you for your Attention! • For more Information please contact • Jeff Derstadt • Senior Development Lead • jeffders@microsoft.com • 425-706-9683 • Microsoft Corporation • 1 Microsoft Way • Redmond, WA 98052 USA http://msdn.microsoft.com/data Gives us feedback http://blogs.msdn.com/adonet http://blogs.msdn.com/efdesign