language integrated query
DESCRIPTION
Language Integrated Query. Mike Taulty Developer & Platform Group Microsoft Ltd [email protected] http://www.mtaulty.com. Agenda. Why do we want LINQ? How are query capabilities added to the languages? What is LINQ enabled in VS2008 & Fx 3.5? What is LINQ enabled after VS2008?. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/1.jpg)
Language Integrated Query
Mike TaultyDeveloper & Platform GroupMicrosoft [email protected] http://www.mtaulty.com
![Page 2: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/2.jpg)
Agenda
Why do we want LINQ?How are query capabilities added to the languages?What is LINQ enabled in VS2008 & Fx 3.5?What is LINQ enabled after VS2008?
![Page 3: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/3.jpg)
Why do we need LINQ?
My Code
“API”
SQL XML
Query As String Loosely typed result
Objects
![Page 4: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/4.jpg)
Language Syntax for Querying
![Page 5: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/5.jpg)
LINQ brings us closer to data
![Page 6: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/6.jpg)
VB9
LINQ in the Languages
Many new language features in VB9 & C# 3
XML Literals
Relaxed Delegates
C# 3.0
Extension Methods
Object Initialisers
Anonymous Types
Implicit Typing
Lambdas
Collection Initialisers
Partial Methods
![Page 7: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/7.jpg)
VB9
LINQ in the Languages
Some are enablers for LINQ
C# 3.0
Collection Initialisers
Partial Methods
![Page 8: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/8.jpg)
LINQ Language Features
![Page 9: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/9.jpg)
Query Pattern -> Language Features
![Page 10: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/10.jpg)
Query Pattern -> Language Features
Compiler looks for extension methods which extend
IEnumerable<T> IQueryable<T>
![Page 11: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/11.jpg)
IEnumerable<T> & IQueryable<T>
IEnumerable – query executed piece by piece
IQueryable – query executed in one go
whereselect
Capture & Execute
Execute Execute
where select
![Page 12: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/12.jpg)
LINQ in VS2008 & Fx 3.5
![Page 13: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/13.jpg)
LINQ to SQL, XML and DataSet
![Page 14: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/14.jpg)
Beyond VS 2008 – ADO.NET V3.0
DataStore (SQL, Oracle, etc)
ADO.NET Provider (e.g. SqlClient, OracleClient, etc)
ADO.NET V2.0
ADO.NET Entity Provider (EntityClient)
Conceptual Data Model
Query with LINQ to Entities, Entity SQL
ADO.NET V3.0 & Entity Framework
![Page 15: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/15.jpg)
LINQ to Entities
![Page 16: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/16.jpg)
Summary
LINQ plumbed into VB9 and C#3.0 LanguagesLots of other language features too
LINQ enabled in .NET Framework V3.5Objects, SQL, XML, DataSet
LINQ enabled post .NET Framework V3.5Entities...
![Page 17: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/17.jpg)
Resources
http://msdn.microsoft.com/vstudio MSDN LINQ Developer Centre
http://tinyurl.com/3e2qpo
ADO.NET Team Bloghttp://blogs.msdn.com/adonet
![Page 18: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/18.jpg)
MSDN in the UK
Visit http://msdn.co.uk NewsletterEventsNugget VideosBlogs
![Page 19: Language Integrated Query](https://reader036.vdocuments.mx/reader036/viewer/2022062411/56812bc5550346895d9009ba/html5/thumbnails/19.jpg)
© 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.