language integrated query

of 19/19
Language Integrated Query Mike Taulty Developer & Platform Group Microsoft Ltd [email protected]

Post on 22-Feb-2016




0 download

Embed Size (px)


Language Integrated Query. Mike Taulty Developer & Platform Group Microsoft Ltd [email protected] 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 Presentation


Language Integrated QueryMike TaultyDeveloper & Platform GroupMicrosoft [email protected] http://www.mtaulty.com1AgendaWhy 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?Why do we need LINQ?My CodeAPI SQLXMLQuery As StringLoosely typed resultObjects

Language Syntax for Queryingfrom itemName in srcExprjoin itemName in srcExpr on keyExpr equals keyExpr (into itemName)?let itemName = selExprwhere predExprorderby (keyExpr (ascending | descending)?)*select selExprgroup selExpr by keyExprinto itemName query-bodyLINQ brings us closer to dataVB9LINQ in the LanguagesMany new language features in VB9 & C# 3XML LiteralsRelaxed DelegatesC# 3.0Extension MethodsObject InitialisersAnonymous TypesImplicit TypingLambdasCollection InitialisersPartial MethodsVB9LINQ in the LanguagesSome are enablers for LINQC# 3.0Extension MethodsObject InitialisersAnonymous TypesImplicit TypingLambdasCollection InitialisersXML LiteralsRelaxed DelegatesPartial MethodsLINQ Language FeaturesQuery Pattern -> Language Features

Query Pattern -> Language FeaturesCompiler looks for extension methods which extendIEnumerableIQueryableIEnumerable & IQueryableIEnumerable query executed piece by piece

IQueryable query executed in one gowhereselectCapture & ExecuteExecuteExecutewhereselectLINQ in VS2008 & Fx 3.5LINQ to SQL, XML and DataSetBeyond VS 2008 ADO.NET V3.0DataStore (SQL, Oracle, etc)ADO.NET Provider (e.g. SqlClient, OracleClient, etc)ADO.NET V2.0ADO.NET Entity Provider (EntityClient)Conceptual Data ModelQuery with LINQ to Entities, Entity SQLADO.NET V3.0 & Entity FrameworkMappingLINQ to EntitiesSummaryLINQ plumbed into VB9 and C#3.0 LanguagesLots of other language features tooLINQ enabled in .NET Framework V3.5Objects, SQL, XML, DataSetLINQ enabled post .NET Framework V3.5Entities...Resources MSDN LINQ Developer Centre ADO.NET Team Blog MSDN in the UK

Visit NewsletterEventsNugget VideosBlogs There are many more things that we might promote here, examples;Dev CentresSecurity Centre (specifically)Topical Events such as TechEd, PDC and so onSuccess Builder

And many more Ive cut the list short for brevity.

18 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.19