Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advances for Data in VS “Orcas”

Similar presentations


Presentation on theme: "Advances for Data in VS “Orcas”"— Presentation transcript:

1 Advances for Data in VS “Orcas”
Mike Taulty Developer & Platform Group Microsoft Ltd

2 Barriers Between Code & Data
Relational XML "The Data Barrier" My Code Object Objects Metadata Type Safety Compile time checking IntelliSense

3 Today - "String in", "Object Out"
Relational XML We get back an opaque data type XmlNode DataTable, DataReader Metadata Type Safety Compile time checking IntelliSense We solve the problem with a string... "/descendant-or-self/..." "SELECT * FROM ..." "The Data Barrier" My Code

4 These errors show up at runtime, not compile time
Today - Illustrated These errors show up at runtime, not compile time

5 Tomorrow - Query in the Languages
The Language Integrated Query 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 Relational XML Object Objects

6 Taking LINQ to Common Data Stores
Objects XML SQL DataSet 1 2 3

7 LINQ over XML 1 LINQ Pattern New XML API 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 New XML API

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

9 LINQ over XML

10 Object Relational Mapping API
LINQ to SQL 2 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 Object Relational Mapping API Code Gen Tools

11 System.Data.Linq – Data API

12 LINQ to SQL

13 LINQ to DataSet 3 LINQ Pattern DataSet/DataTable FirstName LastName
 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 FirstName LastName Age Height Fred Smith 55 1.2 Jim Jones 22 1.3 John Doe 43 1.4 Jo Blogs 17 1.5 DataSet/DataTable

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

15 LINQ to DataSet

16 Summary Powerful, intuitive LINQ pattern For Relational Data
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 DataSet

17 roadshowresources.com


Download ppt "Advances for Data in VS “Orcas”"

Similar presentations


Ads by Google