the microsoft technical roadshow 2007 advances for data in vs “orcas” mike taulty developer...
Post on 21-Dec-2015
213 views
TRANSCRIPT
The Microsoft
Technical Roadshow 2007
Advances for Data in VS “Orcas”
Mike TaultyDeveloper & Platform GroupMicrosoft [email protected] http://www.mtaulty.com
IEnumerable<T>?
ObjectObject
ObjectObject
from itemName in srcExprwhere predExprorderby (keyExpr (ascending | descending)?)*select selExpr...
where ObjectObject
ObjectObjectorderby
selectObjec
t
IQueryable<T>?
ObjectObject
ObjectObject
from itemName in srcExprwhere predExprorderby (keyExpr (ascending | descending)?)*select selExpr...
where
whereorderby
whereorderby
select
ObjectObject
ObjectObject
Object
LINQ Pattern from itemName in srcExpr join itemName in srcExpr on keyExpr equals keyExpr
(into itemName)?let itemName = selExprwhere predExprorderby (keyExpr (ascending | descending)?)*select selExprgroup selExpr by keyExpr into itemName query-body
LINQ over XML1
But what about?
IdentityRelationshipsInsert, Update, DeleteConstraintsGenerated columnsTransactions
Stored Procedures, Views, FunctionsDeferred LoadingInheritanceConcurrencyModifications without query
e.g. N-Tier updates
Identity Management
SQL
My Process
Identity Management
Row ID = 58, Colour=Red
Query Id=58
UpdateId=58,
Colour=Blue
QueryId=58
ObjectId=58,
Colour = Red Original
ObjectId=58,
Colour = Blue
Current
Change Tracking (1)
SQL
DataContext.SubmitChanges()
Compare & Generate SQL
My Process
Change TrackingObjectId=58,
Colour = Red Original
ObjectId=58,
Colour = Blue
Current
Change Tracking (2)
SQL
My Process
Change Tracking
UpdateId=58,
Colour=Blue
ObjectId=58,
Colour = Red Original
ObjectId=58,
Colour = Blue
Current
Fire PropertyChanged
Notification!
Change Tracking (3)
SQL
DataContext.SubmitChanges()
My Process
Change TrackingObjectId=58,
Colour = Blue
Current
Generate SQL from List of Changes
LINQ Pattern from itemName in srcExpr join itemName in srcExpr on keyExpr equals keyExpr
(into itemName)?let itemName = selExprwhere predExprorderby (keyExpr (ascending | descending)?)*select selExprgroup selExpr by keyExpr into itemName query-body
DataSet/DataTable
LINQ to DataSet3
Linq to DataSet
Existing DataTable already has some query capabilities
LINQ syntax extends to DataSet to apply the same model for querying
Conceptual Models
Conceptual Design(Entities & Relationships)
Customer Order
SalesPerson
places
sells
Application(Entities & Relationships)
Relational Models
Application(Entities & Relationships)
relational schema(normalised, tables, keys)
SP's
Views
Fn's
Mapping LogicConceptual<->Relational
Application(Entities & Relationships)
SP's
Views
Fn's
Mapping LogicConceptual<->Relational
Application(Entities & Relationships)
SP's
Views
Fn's
Mapping LogicConceptual<->Relational
ADO.NETMapping Provider
Entity SQL
Object Services(Inheritance & Complex Types)
ADO.NETDatabase Provider(e.g. SqlProvider)
SQL
Application(Entities & Relationships)
LINQ Syntax
ConceptualSchema(XML)
Mapping
Schema(XML)
StoreSchema(XML)
ADO.NET Entity Framework
Do Try This At Home But...
This Talk Was Brought To You By;
The LINQ May CTPThe ADO.NET V.Next August CTP
Concepts have not changedLater CTPs have slightly altered syntaxMy CTP lacked IntelliSense
In the later builds
Summary
Powerful, intuitive LINQ patternOne "syntax" to learnRelational, hierarchical, object dataUnderpinned by new or existing API's
For Relational DataLINQ to SQL
– ORM over database schema
LINQ to Entities and the Entity Framework– ORM over conceptual model
© 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.