Your SlideShare is downloading. ×
LINQ to Relational in Visual Studio 2008 SP1
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

LINQ to Relational in Visual Studio 2008 SP1

1,206

Published on

LINQ to Relational in VS 2008 Sp1

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,206
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
74
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
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.
  • Transcript

    • 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. Where Are We?
    • 3. “ Traditional” ADO.NET Data Access App Code Customers ADO.NET DataReader Customers Command “ SELECT * FROM CUSTOMERS” DataSet
    • 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. 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. LINQ is not just relational
    • 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. IEnumerable/IQueryable
    • 9. LIN Q is about Query
      • LINQ specifies a standard syntax for querying data
      • LINQ has no standard syntax for modifying data
      • Different API’s take a different approach
        • LINQ to Objects has no approach – unneccessary
        • LINQ to XML
        • LINQ to SQL
        • LINQ to Entities
    • 10. LINQ to Relational ( “L2R” )
      • LINQ to SQL
        • .NET Framework V3.5
        • SQL Server databases – 2000, 2005, 2008 & CE
        • Uses existing ADO.NET SQL Provider
      • ADO.NET Entity Framework (“LINQ to Entities”)
        • .NET Framework V3.5 Service Pack 1
        • Database agnostic
        • Needs modified ADO.NET Providers
          • Microsoft ships SQL and example Oracle provider
          • Various 3 rd party providers in progress
    • 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. 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. L2R - Differences
    • 14. LINQ to Relational
    • 15. Resources
    • 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.

    ×