LINQ - Language Integrated Query for .NET 3.5


Second Meeting, Monday, June 16, 6:00 pm, at Compuware (new location) in Durham


Welcome to LINQ!

 

Last month, we looked at several examples of LINQ, including queries on arrays, SQL, XML, and DataSets. We also covered some of the languages changes in C# and VB.NET to support LINQ.

 

UPDATE: Files for this session are here and here (for the LINQ to SQL performance stuff). 

If you missed last month's meeting, don't despair; you can still pick up the thread with our LINQ discussion.

 

This month, we'll continue reviewing the language changes for LINQ:

 

  • brief review of LINQ syntax
  • Lambda expressions
  • Extension methods

 

We'll take a quick run through the options for connecting LINQ to SQL, including both the visual designer and the SQLMetal command. This is not a full exploration of LINQ to SQL (that will take several meetings)! However, being able to use the Northwind sample database as a data source for LINQ will enable us to focus on LINQ capabilities, without the distraction of having to generate sample data for the more complex queries.

 

We'll take a quick look at a couple of "new" ways to break applications using LINQ, since these are errors that can occur in a number of ways while learning to work with LINQ:

 

Null handling in LINQ and in Lambda expressions

Side effects of deferred query execution

 

Finally, with all these pre-requisities out of the way, we'll get into the core functionality of LINQ, starting with the various deferred query functions:

 

  • Where
  • Select
  • SelectMany
  • Take
  • TakeWhile
  • Skip
  • SkipWhile
  • Concat
  • OrderBy
  • OrderByDescending
  • ThenBy
  • ThenByDescending
  • Reverse
  • Join
  • GroupJoin
  • GroupBy
  • Distinct
  • Union
  • Intersect
  • Except
  • Cast
  • OfType
  • AsEnumerable
  • Element
  • DefaultIfEmpty
  • Range
  • Repeat
  • Empty

 

We won't get through all of these in one evening!

 

See you there,

Diane


Page Information

  • 1 month ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts