Microsoft LINQ for C# Developers

2 days

Course Overview

LINQ is the part of the .NET Framework that provides a generic approach to querying data from different data sources. It has quickly become the next must-have skill for .NET developers.
This course has the detail you need to grasp Microsoft’s new querying technology, and concise explanations to help you learn it quickly.


Experience with developing ADO.NET using C#.

Course Outline

Language Extensions

  • Implicitly typed variables
  • Extension methods
  • Object initialization syntax
  • Anonymous types
  • Lambda expressions

Introduction to LINQ

  • LINQ expressions
  • Using via extension methods
  • Filtering
  • Sorting
  • Aggregation
  • Skip and Take operators
  • Joins

Deferred Execution

  • Benefits and drawbacks
  • IEnumerable vs IQueryable
  • Using across tiers

Data Projection

  • Single result value
  • Existing types
  • Anonymous types
  • Grouping


  • New XML classes
  • Generating XML
  • Querying XML
  • Using data projection
  • Combining with XPath


  • Attributes and mapping
  • Creating a DataContext
  • Deferred loading
  • Saving changes
  • Inserts and deletes
  • Transactions
  • Concurrency
  • Handling exceptions

LINQ to Entities

  • ADO.NET Entity Framework
  • Differences from LINQ to SQL
  • Available providers
  • Defining an Entity Data Model (EDM)
  • Database-first vs. Model-first
  • Object Services
  • Change tracking
  • Using EntityClient
  • Using stored procedures
  • N-tier and service-based applications