ADO NET Entity Framework Mike Taulty Developer Platform

  • Slides: 19
Download presentation
ADO. NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike. Taulty@microsoft.

ADO. NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike. Taulty@microsoft. com http: //www. website. com/

ADO. NET Entity Framework Extension to the ADO. NET provider model Functionality Program against

ADO. NET Entity Framework Extension to the ADO. NET provider model Functionality Program against an abstracted model of your store schema Use traditional ADO. NET API or ORM/LINQ Slated to ship mid 2008 Currently at Beta 3, Tooling at CTP 2 Downloadable in ASP. NET 3. 5 Extensions Preview

Quick Demo to Defer Boredom

Quick Demo to Defer Boredom

Entity Framework Architecture V 3. 0 . NET Entity Provider (Entity SQL) Programming Model

Entity Framework Architecture V 3. 0 . NET Entity Provider (Entity SQL) Programming Model Entity Conceptual Model LINQ Reader relationship Object Relational Mapping Connection Entity Command Mapping (MSL) V 2. 0 . NET Data Provider Reader Connection Adapter Command Store

Tools, SSDL, MSL, CSDL

Tools, SSDL, MSL, CSDL

Programming with Entity SQL The Entity. Client provides the usual Connection, Command, Data. Reader

Programming with Entity SQL The Entity. Client provides the usual Connection, Command, Data. Reader There is no Entity. Data. Adapter V 1. 0 the model is read-only Entity SQL has some additional constructs to expose the underlying conceptual model – e. g. ; ANYELEMENT CREATEREF OVERLAPS DEREF IS OF ROW KEY SELECT MULTISET NAVIGATE TREAT USING OFTYPE

Programming with Entity Client

Programming with Entity Client

Mapping Examples ( 1 – Splitting ) Store Mapping Good Customers Type=“G” Entities Customers

Mapping Examples ( 1 – Splitting ) Store Mapping Good Customers Type=“G” Entities Customers ID First. Name Customer. Id Last. Name First Last Bad Customers Type ID Fore. Name Surname Type=“B”

Mapping Examples ( 2 – TPH ) Store Mapping Entities Customers ID Customer. Id

Mapping Examples ( 2 – TPH ) Store Mapping Entities Customers ID Customer. Id First. Name First Last. Name Last Is. Premium Overdraft ? Account. Manager Premium. Customer Overdraft Account. Manager * Framework also supports TPT

Mapping Examples ( 3 – View + SPs ) Store Mapping Entities Client. View

Mapping Examples ( 3 – View + SPs ) Store Mapping Entities Client. View 1 select c. id, c. name from customers c where c. country = ‘UK’ p_Delete. Uk. Customer p_Update. Uk. Customer p_Insert. Uk. Customer. Id Name

Querying with Entity SQL

Querying with Entity SQL

Programming with LINQ to Entities New Data Access ORM API implemented in assembly System.

Programming with LINQ to Entities New Data Access ORM API implemented in assembly System. Data. Entity. dll System. Data. Entity. Design. dll Many Namespaces System. Data. Entity System. Data. Objects and many more. . . ORM API can be used with or without LINQ

Key Classes provider Connection Metadata CSDL State Management CRUD MSL SSDL

Key Classes provider Connection Metadata CSDL State Management CRUD MSL SSDL

LINQ to Entities – Possible Topics Change Tracking Stored Procs Concurrency Transactions (i)POCO Inheritance

LINQ to Entities – Possible Topics Change Tracking Stored Procs Concurrency Transactions (i)POCO Inheritance Customising Code-Gen Metadata N-Tier Compiled Queries

LINQ to Entities

LINQ to Entities

Resources Download ASP. NET 3. 5 Extensions Preview http: //www. asp. net ADO. NET

Resources Download ASP. NET 3. 5 Extensions Preview http: //www. asp. net ADO. NET Team Blog http: //blogs. msdn. com/adonet Search for “entity” on http: //mtaulty. com

Updates Go here to download the latest version of this slide-deck http: //mtaulty. com/downloads/dw

Updates Go here to download the latest version of this slide-deck http: //mtaulty. com/downloads/dw 08. zip

MSDN in the UK Visit http: //msdn. co. uk Newsletter Events Screencasts Blogs

MSDN in the UK Visit http: //msdn. co. uk Newsletter Events Screencasts Blogs

© 2007 Microsoft Ltd. All rights reserved. Microsoft, Windows Vista and other product names

© 2007 Microsoft Ltd. 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.