Language Integrated Query Mike Taulty Developer & Platform Group Microsoft Ltd [email_address]   http://www.mtaulty.com
Agenda Why 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 Code “ API”   SQL XML Query As String Loosely typed result Objects
Language Integrated Query
LINQ brings us closer to data
LINQ in the Languages Many new language features in VB9 & C# 3 VB9 XML Literals Relaxed Delegates C# 3.0 Extension Methods Object Initialisers Anonymous Types Implicit Typing Lambdas Collection Initialisers Partial Methods Automatic Properties
LINQ in the Languages Some are enablers for LINQ VB9 C# 3.0 Collection Initialisers Partial Methods Automatic Properties
LINQ Language Features
Query Pattern -> Language Features
Query Pattern -> Language Features Compiler looks for extension methods which extend IEnumerable<T> IQueryable<T>
IEnumerable<T> & IQueryable<T> IEnumerable – query executed piece by piece IQueryable – query executed in one go where select Capture & Execute Execute Execute where select
LINQ in VS2008 & Fx 3.5
LINQ to SQL, XML and DataSet
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
LINQ to Entities
Summary LINQ plumbed into VB9 and C#3.0 Languages Lots of other language features too LINQ enabled in .NET Framework V3.5 Objects, SQL, XML, DataSet LINQ enabled post .NET Framework V3.5 Entities ...
Resources http://msdn.microsoft.com/vstudio   MSDN LINQ Developer Centre http://tinyurl.com/3e2qpo   ADO.NET Team Blog http://blogs.msdn.com/adonet
MSDN in the UK Visit  http://msdn.co.uk   Newsletter Events Nugget Videos Blogs
 

LINQ in Visual Studio 2008

  • 1.
    Language Integrated QueryMike Taulty Developer & Platform Group Microsoft Ltd [email_address] http://www.mtaulty.com
  • 2.
    Agenda Why LINQ?How are query capabilities added to the languages? What is LINQ enabled in VS2008 & Fx 3.5? What is LINQ enabled after VS2008?
  • 3.
    Why do weneed LINQ? My Code “ API”  SQL XML Query As String Loosely typed result Objects
  • 4.
  • 5.
    LINQ brings uscloser to data
  • 6.
    LINQ in theLanguages Many new language features in VB9 & C# 3 VB9 XML Literals Relaxed Delegates C# 3.0 Extension Methods Object Initialisers Anonymous Types Implicit Typing Lambdas Collection Initialisers Partial Methods Automatic Properties
  • 7.
    LINQ in theLanguages Some are enablers for LINQ VB9 C# 3.0 Collection Initialisers Partial Methods Automatic Properties
  • 8.
  • 9.
    Query Pattern ->Language Features
  • 10.
    Query Pattern ->Language Features Compiler looks for extension methods which extend IEnumerable<T> IQueryable<T>
  • 11.
    IEnumerable<T> & IQueryable<T>IEnumerable – query executed piece by piece IQueryable – query executed in one go where select Capture & Execute Execute Execute where select
  • 12.
  • 13.
    LINQ to SQL,XML and DataSet
  • 14.
    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
  • 15.
  • 16.
    Summary LINQ plumbedinto VB9 and C#3.0 Languages Lots of other language features too LINQ enabled in .NET Framework V3.5 Objects, SQL, XML, DataSet LINQ enabled post .NET Framework V3.5 Entities ...
  • 17.
    Resources http://msdn.microsoft.com/vstudio MSDN LINQ Developer Centre http://tinyurl.com/3e2qpo ADO.NET Team Blog http://blogs.msdn.com/adonet
  • 18.
    MSDN in theUK Visit http://msdn.co.uk Newsletter Events Nugget Videos Blogs
  • 19.