ado.net entity framework mike taulty developer & platform group microsoft ltd...
TRANSCRIPT
![Page 1: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/1.jpg)
ADO.NET Entity Framework
Mike TaultyDeveloper & Platform GroupMicrosoft [email protected] http://www.mtaulty.com
![Page 2: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/2.jpg)
ADO.NET Entity Framework
Extension to the ADO.NET provider modelFunctionality
Program against an abstracted model of your store schemaUse traditional ADO.NET API or ORM/LINQ
Slated to ship mid 2008Currently at Beta 3, Tooling at CTP 2Downloadable in ASP.NET 3.5 Extensions Preview
![Page 3: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/3.jpg)
Quick Demo to Defer Boredom
![Page 4: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/4.jpg)
.NET Entity Provider (Entity SQL)
Command
ConnectionReader
V3.0
Entity Framework Architecture
Store
.NET Data Provider
V2.0
Command
ConnectionReader
Adapter
V3.0
Conceptual Model
Entity Entityrelationship
Mapping (MSL)
V3.0Programming Model
Object Relational Mapping
LINQ
![Page 5: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/5.jpg)
Tools, SSDL, MSL, CSDL
![Page 6: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/6.jpg)
Programming with Entity SQL
The EntityClient provides the usualConnection, 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 – e.g.;
![Page 7: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/7.jpg)
Programming with Entity Client
![Page 8: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/8.jpg)
Mapping Examples ( 1 – Splitting )
Store
Good CustomersGood Customers
ID
FirstName
LastName
Bad CustomersBad Customers
ID
ForeName
Surname
CustomersCustomers
CustomerId
First
Last
Type
EntitiesMapping
Type=“G”
Type=“B”
![Page 9: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/9.jpg)
Mapping Examples ( 2 – TPH )
Store
CustomerCustomer
CustomerId
First
Last
EntitiesMapping
CustomersCustomers
ID
FirstName
LastName
IsPremium
Overdraft
AccountManagerPremiumCustomerPremiumCustomer
Overdraft
AccountManager
?
* Framework also supports TPT
![Page 10: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/10.jpg)
Mapping Examples ( 3 – View + SPs )
Store
UkCustomerUkCustomer
CustomerId
Name
EntitiesMapping
ClientView1ClientView1
select c.id, c.namefrom customers cwhere c.country = ‘UK’
p_DeleteUkCustomerp_DeleteUkCustomer
p_UpdateUkCustomerp_UpdateUkCustomer
p_InsertUkCustomerp_InsertUkCustomer
![Page 11: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/11.jpg)
Querying with Entity SQL
![Page 12: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/12.jpg)
Programming with LINQ to Entities
New Data Access ORM API implemented in assembly
System.Data.Entity.dllSystem.Data.Entity.Design.dll
Many NamespacesSystem.Data.EntitySystem.Data.Objectsand many more...
ORM API can be used with or without LINQ
![Page 13: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/13.jpg)
Key Classes
StateManagement
Connectionprovider
MetadataMSL SSDLCSDL
CRUD
![Page 14: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/14.jpg)
LINQ to Entities – Possible Topics
![Page 15: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/15.jpg)
LINQ to Entities
![Page 16: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/16.jpg)
Resources
Download ASP.NET 3.5 Extensions Previewhttp://www.asp.net
ADO.NET Team Bloghttp://blogs.msdn.com/adonet
Search for “entity” onhttp://mtaulty.com
![Page 17: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/17.jpg)
Updates
Go here to download the latest version of this slide-deck
http://mtaulty.com/downloads/dw08.zip
![Page 18: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/18.jpg)
MSDN in the UK
Visit http://msdn.co.uk NewsletterEventsScreencastsBlogs
![Page 19: ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com](https://reader033.vdocument.in/reader033/viewer/2022051018/56649edc5503460f94bed16a/html5/thumbnails/19.jpg)
© 2007 Microsoft Ltd. 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.