Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Microsoft Technical Roadshow 2007 Advances for Data in VS “Orcas” Mike Taulty Developer & Platform Group Microsoft Ltd

Similar presentations


Presentation on theme: "The Microsoft Technical Roadshow 2007 Advances for Data in VS “Orcas” Mike Taulty Developer & Platform Group Microsoft Ltd"— Presentation transcript:

1 The Microsoft Technical Roadshow 2007 Advances for Data in VS “Orcas” Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com http://www.mtaulty.com

2 Earlier that day.... Object

3 IEnumerable ? Object from itemName in srcExpr where predExpr orderby (keyExpr (ascending | descending)?)* select selExpr... where Object orderby select Object

4 IQueryable ? Object from itemName in srcExpr where predExpr orderby (keyExpr (ascending | descending)?)* select selExpr... where orderby where orderby select Object

5 IEnumerable vs IQueryable

6 Agenda ”Would you like LINQ with that?” 1 1 2 2 3 3

7 LINQ Pattern from itemName in srcExpr join itemName in srcExpr on keyExpr equals keyExpr (into itemName)? let itemName = selExpr where predExpr orderby (keyExpr (ascending | descending)?)* select selExpr group selExpr by keyExpr into itemName query-body LINQ Pattern from itemName in srcExpr join itemName in srcExpr on keyExpr equals keyExpr (into itemName)? let itemName = selExpr where predExpr orderby (keyExpr (ascending | descending)?)* select selExpr group selExpr by keyExpr into itemName query-body LINQ over XML 1 1

8 System.Xml.XLinq New XML API (more DOM than reader) Key classes: XElement, XAttribute

9 LINQ over XML

10 LINQ to SQL 2 2

11 System.Data.Dlinq – Data API

12 DataContext, Table & Friends

13 But what about? Identity Relationships Insert, Update, Delete Constraints Generated columns Transactions Stored Procedures, Views, Functions Deferred Loading Inheritance Concurrency Modifications without query e.g. N-Tier updates

14 More detail but no updates yet...

15 Identity Management SQL My Process Identity Management Row ID = 58, Colour=Red Query Id=58 Query Id=58 Update Id=58, Colour=Blue Update Id=58, Colour=Blue Query Id=58 Query Id=58 Object Id=58, Colour = Red Original Object Id=58, Colour = Blue Current

16 Change Tracking (1) SQL DataContext.SubmitChanges() Compare & Generate SQL My Process Change Tracking Object Id=58, Colour = Red Original Object Id=58, Colour = Blue Current

17 Change Tracking (2) SQL My Process Change Tracking Update Id=58, Colour=Blue Update Id=58, Colour=Blue Object Id=58, Colour = Red Original Object Id=58, Colour = Blue Current Fire Property Changed Notification! Fire Property Changed Notification!

18 Change Tracking (3) SQL DataContext.SubmitChanges() My Process Change Tracking Object Id=58, Colour = Blue Current Generate SQL from List of Changes

19 Updates, Transactions...

20 LINQ Pattern from itemName in srcExpr join itemName in srcExpr on keyExpr equals keyExpr (into itemName)? let itemName = selExpr where predExpr orderby (keyExpr (ascending | descending)?)* select selExpr group selExpr by keyExpr into itemName query-body LINQ Pattern from itemName in srcExpr join itemName in srcExpr on keyExpr equals keyExpr (into itemName)? let itemName = selExpr where predExpr orderby (keyExpr (ascending | descending)?)* select selExpr group selExpr by keyExpr into itemName query-body DataSet/DataTable LINQ to DataSet 3 3

21 Linq to DataSet Existing DataTable already has some query capabilities LINQ syntax extends to DataSet to apply the same model for querying

22 LINQ to DataSet

23 Putting a few things together

24 Awareness: ADO.NET Entity Framework Awareness: ADO.NET Entity Framework

25 Conceptual Models Conceptual Design (Entities & Relationships) Conceptual Design (Entities & Relationships) Customer Order SalesPerson places sells Application (Entities & Relationships) Application (Entities & Relationships)

26 Relational Models Application (Entities & Relationships) Application (Entities & Relationships) relational schema (normalised, tables, keys) SP's Views Fn's Mapping Logic Conceptual Relational Application (Entities & Relationships) Application (Entities & Relationships) SP's Views Fn's Mapping Logic Conceptual Relational Application (Entities & Relationships) Application (Entities & Relationships) SP's Views Fn's Mapping Logic Conceptual Relational

27 ADO.NET Mapping Provider ADO.NET Mapping Provider Entity SQL Object Services (Inheritance & Complex Types) ADO.NET Database Provider (e.g. SqlProvider) ADO.NET Database Provider (e.g. SqlProvider) SQL Application (Entities & Relationships) Application (Entities & Relationships) LINQ Syntax Conceptual Schema (XML) Mapping Schema (XML) Store Schema (XML) ADO.NET Entity Framework

28 Do Try This At Home But... This Talk Was Brought To You By; The LINQ May CTP The ADO.NET V.Next August CTP Concepts have not changed Later CTPs have slightly altered syntax My CTP lacked IntelliSense In the later builds

29 Summary Powerful, intuitive LINQ pattern One "syntax" to learn Relational, hierarchical, object data Underpinned by new or existing API's For Relational Data LINQ to SQL –ORM over database schema LINQ to Entities and the Entity Framework –ORM over conceptual model

30 © 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.


Download ppt "The Microsoft Technical Roadshow 2007 Advances for Data in VS “Orcas” Mike Taulty Developer & Platform Group Microsoft Ltd"

Similar presentations


Ads by Google