LINQ to “Relational” (L2R) in Visual Studio 2008 SP 1 Mike Taulty Developer & Platform Group Microsoft Ltd [email_address]...
Where Are We?
“ Traditional” ADO.NET Data Access App Code Customers ADO.NET DataReader Customers Command “ SELECT *  FROM CUSTOMERS” Dat...
“ Traditional” ADO.NET Data Access App Code Customers ADO.NET Layer DataReader Customers Command “ SELECT *  FROM CUSTOMER...
Language  Integrated  Query from   data   in   someDataSource join   otherData   in   someOtherSource   on   keyExpr   equ...
LINQ is  not  just relational
Two Different Styles of LINQ  from   data   in   someDataSource join   otherData   in   someOtherSource   on   keyExpr   e...
IEnumerable/IQueryable
LIN Q  is about  Query <ul><li>LINQ specifies a standard syntax for  querying  data </li></ul><ul><li>LINQ has no standard...
LINQ to Relational ( “L2R” ) <ul><li>LINQ to SQL </li></ul><ul><ul><li>.NET Framework V3.5 </li></ul></ul><ul><ul><li>SQL ...
L2R  – Commonality in Querying App Code Customers “ LINQ” Queryable Object DataReader Customers LINQ Query Call Execute Co...
L2R  – Commonality in Modifying App Code Customers “ LINQ” Context Customer FirstName LastName ... Customer FirstName Last...
L2R - Differences
LINQ to Relational
Resources
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be...
Upcoming SlideShare
Loading in...5
×

LINQ to Relational in Visual Studio 2008 SP1

1,223

Published on

LINQ to Relational in VS 2008 Sp1

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,223
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
75
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 06/07/09 01:40 © 2007 Microsoft Corporation. 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.
  • LINQ to Relational in Visual Studio 2008 SP1

    1. 1. LINQ to “Relational” (L2R) in Visual Studio 2008 SP 1 Mike Taulty Developer & Platform Group Microsoft Ltd [email_address] http://www.miketaulty.com
    2. 2. Where Are We?
    3. 3. “ Traditional” ADO.NET Data Access App Code Customers ADO.NET DataReader Customers Command “ SELECT * FROM CUSTOMERS” DataSet
    4. 4. “ Traditional” ADO.NET Data Access App Code Customers ADO.NET Layer DataReader Customers Command “ SELECT * FROM CUSTOMERS” Data Object Load() Customer FirstName LastName ... Customer FirstName LastName ... Customer FirstName LastName ... Customer FirstName LastName ... ORM
    5. 5. Language Integrated Query from data in someDataSource join otherData in someOtherSource on keyExpr equals keyExpr ( into itemName )? let someVariable = someExpression where somePredicate orderby ( expression ( ascending | descending )?)* select expression group expression by keyExpression   into itemName .NET Framework V3.5 Service Pack 1 Language Features ( C# V3 and VB V9 ) Custom Objects XML SQL Entities
    6. 6. LINQ is not just relational
    7. 7. Two Different Styles of LINQ from data in someDataSource join otherData in someOtherSource on keyExpr equals keyExpr ( into itemName )? let someVariable = someExpression where somePredicate orderby ( expression ( ascending | descending )?)* select expression group expression by keyExpression   into itemName IEnumerable<T> IQueryable<T>
    8. 8. IEnumerable/IQueryable
    9. 9. LIN Q is about Query <ul><li>LINQ specifies a standard syntax for querying data </li></ul><ul><li>LINQ has no standard syntax for modifying data </li></ul><ul><li>Different API’s take a different approach </li></ul><ul><ul><li>LINQ to Objects has no approach – unneccessary </li></ul></ul><ul><ul><li>LINQ to XML </li></ul></ul><ul><ul><li>LINQ to SQL </li></ul></ul><ul><ul><li>LINQ to Entities </li></ul></ul>
    10. 10. LINQ to Relational ( “L2R” ) <ul><li>LINQ to SQL </li></ul><ul><ul><li>.NET Framework V3.5 </li></ul></ul><ul><ul><li>SQL Server databases – 2000, 2005, 2008 & CE </li></ul></ul><ul><ul><li>Uses existing ADO.NET SQL Provider </li></ul></ul><ul><li>ADO.NET Entity Framework (“LINQ to Entities”) </li></ul><ul><ul><li>.NET Framework V3.5 Service Pack 1 </li></ul></ul><ul><ul><li>Database agnostic </li></ul></ul><ul><ul><li>Needs modified ADO.NET Providers </li></ul></ul><ul><ul><ul><li>Microsoft ships SQL and example Oracle provider </li></ul></ul></ul><ul><ul><ul><li>Various 3 rd party providers in progress </li></ul></ul></ul>
    11. 11. L2R – Commonality in Querying App Code Customers “ LINQ” Queryable Object DataReader Customers LINQ Query Call Execute Context GetQueryable<T>() Execute<T>() Customer FirstName LastName ... Customer FirstName LastName ... Customer FirstName LastName ... Materialise objects ADO.NET Provider Translate to SQL ORM Metadata Create
    12. 12. L2R – Commonality in Modifying App Code Customers “ LINQ” Context Customer FirstName LastName ... Customer FirstName LastName ... Customer FirstName LastName ... “ Create”<T>() “ Delete”<T> SaveChanges() Create Delete Update State Del Del Del Ins Upd Save ADO.NET Provider Translate to SQL ORM Metadata
    13. 13. L2R - Differences
    14. 14. LINQ to Relational
    15. 15. Resources
    16. 16. © 2008 Microsoft Corporation. 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.
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×