KEMBAR78
Module 3: Introduction to LINQ (PowerPoint Slides) | PPT
Visual Studio 2008 Training 3.5 RTM Mohamed Saleh [email_address] www.jordev.net www.geeksconnected.com/mohamed
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
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
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

Module 3: Introduction to LINQ (PowerPoint Slides)

  • 1.
    Visual Studio 2008Training 3.5 RTM Mohamed Saleh [email_address] www.jordev.net www.geeksconnected.com/mohamed
  • 2.
    Module 3: Introduction To Linq
  • 3.
    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
  • 4.
    Introducing LINQ ProjectLinq 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
  • 5.
    LINQ Assemblies Thefollowing 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
  • 6.
    LINQ Query ExpressionsWhat 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
  • 7.
    Lab 1: Writing Query Expressions Writing Linq Query Expression. Using Query Operators. Using var and IEnumerable<T> query varaiables. Querying In-Memory Collections.
  • 8.
    Standard Query OperatorsThe 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
  • 9.
    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.
  • 10.
    Conversion Operators Theconversion operator enable the conversion of query results into different collection types. The query conversion operators: ToArray ToList ToDictionary OfType Conversion Operators Overview
  • 11.
    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.
  • 12.
    Partitioning Operators Linqextension 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
  • 13.
    Lab 4: Using Partitioning Operators Use the partitioning query operators. Skipping elements based on conditional expression. Retrieving elements using Take and TakeWhile operators.
  • 14.
    LINQ Bridge LINQImplemented 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
  • 15.
    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.
  • 16.
    Review In thismodule, 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