1 / 29

ADO.NET Entity Framework

Mike Taulty Developer & Platform Group Microsoft UK Mike.Taulty@microsoft.com http://www.miketaulty.com. ADO.NET Entity Framework. Entity Framework – Key Facts. Extension to the ADO.NET Provider Model Pluggable to support any database Functionality

chyna
Download Presentation

ADO.NET Entity Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mike Taulty Developer & Platform Group Microsoft UK Mike.Taulty@microsoft.com http://www.miketaulty.com ADO.NET Entity Framework

  2. Entity Framework – Key Facts • Extension to the ADO.NET Provider Model • Pluggable to support any database • Functionality • Abstracts a model from your store schema • Offers Object Relational Mapping/LINQ and ADO.NET APIs • Status • Coming in Visual Studio 2008 Sp1, Summer 2008 • Currently in VS 2008 Sp1 Beta 1 • 3 previous independent betas

  3. ADO.NET Entity Framework ADO.NET API ORM API Entity Provider Connection ObjectContext Command ObjectQuery Conceptual Model DataReader Map Store Model SQL Provider Oracle Provider ...

  4. ADO.NET Entity Framework ADO.NET API ORM API Entity Provider Conceptual Model Map Store Model SQL Provider Oracle Provider ...

  5. LINQ to SQL? LINQ to Entities?

  6. Programming Entity Framework with LINQ DEMO

  7. Key Classes provider Connection Metadata CSDL MSL SSDL State Management CRUD

  8. LINQ to Entities – Lots of Topics

  9. ADO.NET Entity Framework ADO.NET API ORM API Entity Provider Conceptual Model Map Store Model SQL Provider Oracle Provider ...

  10. Manipulating our Conceptual Model DEMO

  11. ADO.NET Entity Framework ADO.NET API ORM API Entity Provider Conceptual Model Map Store Model SQL Provider Oracle Provider ...

  12. Programming with Entity SQL and ADO.NET DEMO

  13. EF Providers in Progress

  14. Resources • New Data Developer Site • http://www.datadeveloper.net • ADO.NET Team Blog • http://blogs.msdn.com/adonet • My website  • http://www.miketaulty.com ( search Entity )

  15. Mike Taulty Developer & Platform Group Microsoft UK Mike.Taulty@microsoft.com http://www.miketaulty.com ADO.NET Entity framework

  16. Provider Specific (PL/SQL) “SELECT * FROM CUSTOMERS” ADO.NET Today App Code ADO.NET Command Providers Execute SQL Server DataReader Oracle Oracle Customers Customers Customers ...

  17. ADO.NET Entity Framework Conceptual Model Map Customers UKCustomer UKPremiumCustomer

  18. Provider Agnostic (ESQL) “SELECT * FROM UKCUSTOMER” ADO.NET Entity Framework App Code ADO.NET Conceptual Model Map Entity Provider Command Execute DataReader UKCustomer UKCustomer UKPremiumCustomer Customers UKCustomer Providers* SQL Server Oracle Oracle ...

  19. ADO.NET Entity Framework EF EF .NET Entity Provider (Entity SQL) Programming Model EF Entity Data Model (CSDL) Conceptual Model LINQ Reader Connection Command Entity Entity Object Relational Mapping relationship Mapping (MSL) V2.0 Store Model (SSDL) .NET Data Provider Store Reader Connection Adapter Command

  20. Programming with Entity SQL • The EntityClient provides the usual • Connection, Command, DataReader • There is no EntityDataAdapter • V1.0 the model is read-only • Entity SQL has some additional constructs to expose the underlying conceptual model

  21. Programming with Entity SQL DEMO

  22. Mapping Examples ( 1 – Splitting ) Mapping Store Entities Type=“G” Customers Good Customers CustomerId ID First FirstName Last LastName Type Bad Customers ID ForeName Type=“B” Surname

  23. Mapping Examples ( 2 – TPH ) Store Mapping Entities Customer Customers CustomerId ID First FirstName Last LastName ? IsPremium Overdraft AccountManager PremiumCustomer Overdraft AccountManager * Framework also supports TPT

  24. Mapping Examples ( 3 – View + SPs ) Store Mapping Entities UkCustomer ClientView1 CustomerId select c.id, c.name from customers c where c.country = ‘UK’ Name p_DeleteUkCustomer p_UpdateUkCustomer p_InsertUkCustomer

  25. Querying Different Models with Entity SQL DEMO

  26. New Data Access ORM API implemented in assembly System.Data.Entity.dll Many Namespaces System.Data.Entity System.Data.Objects ... Object Relational Mapping API can be used with or without LINQ Programming with LINQ to Entities

  27. Programming with LINQ to Entities DEMO

More Related