Module 3: Introduction to LINQ (PowerPoint Slides)
Upcoming SlideShare
Loading in...5

Module 3: Introduction to LINQ (PowerPoint Slides)



Module 3: Introduction to LINQ (PowerPoint Slides)

Module 3: Introduction to LINQ (PowerPoint Slides)
Jordan .NET User Group (Jordev)
Community Material
Mohamed Saleh



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • 4str
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Module 3: Introduction to LINQ (PowerPoint Slides) Module 3: Introduction to LINQ (PowerPoint Slides) Presentation Transcript

  • Visual Studio 2008 Training 3.5 RTM Mohamed Saleh [email_address]
  • Module 3: Introduction To Linq
  • Overview
    • What is Linq
    • Understand the Query Expressions and Query Operators
    • Writing queries using extension methods
    • Using the Partitioning and Conversion operators
    • Explain the usage of the new Linq Assemblies
    • Enabling Linq to Objects for .Net Framework 2.0
    View slide
  • Introducing LINQ Project
    • Linq is a set of language extensions that enable the query operations over the data.
    • Linq relies on the C# 3.0 Language Enhancements .
    • Linq Building Blocks:
            • Object Initializers
            • Lambda Expressions
            • Extension Methods
            • Anonymous types
            • Implicit Typing Variables
    LINQ Project Overview View slide
  • LINQ Assemblies
    • The following describes the new assemblies and its use:
    • System.Core.dll: Extension Methods for IEnumerable<T> .
    • System.Data.DataExtensions.dll: Providing LINQ for DataSet.
    • System.Data.Linq.dll: LINQ implementation for SQL Server.
    • System.Xml.Linq.dll: LINQ Implementation for XML
    LINQ Assemblies
  • LINQ Query Expressions
    • What is Query?
    • What is Query Operators?
    • How to Write Query Expressions?
    • IEnumerable<T> and Query Results
    • What is Deferred Execution?
    • What is Immediate Execution?
    LINQ Query Expressions
  • Lab 1: Writing Query Expressions
    • Writing Linq Query Expression.
    • Using Query Operators.
    • Using var and IEnumerable<T> query varaiables.
    • Querying In-Memory Collections.
  • Standard Query Operators
    • The System.Linq namespace contains different Linq Extensions under the System.Linq.Enumerable class.
    • Commonly Used Operators:
    • OrderByDescending
    • OrderBy
    • Take
    • Sum
    • Distinct
    • Count
    • First
    Standard Query Operators Overview
  • Lab 2: Using Initializers
    • Writing Queries using Linq Extension Methods.
    • Sorting the elements using the OrderByDescending extension method.
    • Returning specific elements using Take and First methods.
    • Calculating the total number of elements using the Count method.
    • Returning Distinct values from a sequence of values.
  • Conversion Operators
    • The conversion operator enable the conversion of query results into different collection types.
    • The query conversion operators:
      • ToArray
      • ToList
      • ToDictionary
      • OfType
    Conversion Operators Overview
  • Lab 3: Using Conversion Operators
    • Enforce the immediate execution of the queries.
    • Converting the query results to Different Collection Types.
    • Filtering the query results based on a specific data type.
  • Partitioning Operators
    • Linq extension methods set contain a group of operators that allows the programmer to partitioning the results of the query into a specific sequence.
    • The query partitioning operators:
      • Take
      • Skip
      • TakeWhile
      • SkipWhile
    Partitioning Operators Overview
  • Lab 4: Using Partitioning Operators
    • Use the partitioning query operators.
    • Skipping elements based on conditional expression.
    • Retrieving elements using Take and TakeWhile operators.
  • LINQ Bridge
    • LINQ Implemented for .NET 3.5, which requires the client to install .NET Framework 3.5.
    • LINQBridge is an open project contains a reimplementation for all standard query operators
    • LINQBridge utilize the Csharp 3.0 Compiler new features to enable LINQ for .NET 2.0 Applications.
    • LINQBridge can be used in Visual Studio 2008 for writing LINQ to Objects expressions.
    • LINQBridge can be used in Visual Studio 2005 using the extension methods style.
    LINQ Bridge Overview
  • Lab 5: Using LINQ for .NET Framework 2.0
    • Writing Linq-Enabled Applications for .NET Framework 2.0.
    • Using the LinqBridge Extension in Visual Studio 2008.
    • Writing Linq to Objects expressions.
  • Review In this module, you learned to:
    • Writing Query Expressions
    • Writing Queries using extension methods directly
    • Using different query operators
    • Enabling Linq to Objects into .NET Framework 2.0 Applications