How To Take This Class

Course Overview

In this Microsoft LINQ Using Visual Studio 2008 course, students will learn to use the exciting new .NET Framework 3.5 feature, Language Integrated Query (LINQ) to easily create complex data-independent queries. In addition, you’ll learn about the new language features added to Visual Basic and C# in Visual Studio 2008 in order to make LINQ possible. Students will start by working through a quick overview of LINQ, and how it applies to working with collections of objects, retrieving data stored in SQL Server, and creating XML content. Subsequent topics introduce new LINQ-oriented language features, LINQ to Objects, LINQ to DataSets, LINQ to SQL, LINQ to XML, and LINQ to Entities. By the time students have completed the course, they will have a good understanding of not only how to construct LINQ queries to work with data, but also how to use the features added to Visual Basic and C# that support LINQ. This course can be delivered in Visual Basic or Visual C# to accommodate a student's language preferences.

Course Prerequisites

This course assumes that students have familiarity with .NET in general, and with specifically with programming ADO.NET. The course makes no attempt to explain basic Visual Studio 2008 or .NET Framework concepts, and assumes that the student is at least familiar with all the concepts covered in the Introduction to Programming with Visual Studio 2008 courses.

Course Audience

This course is designed for students with experience in .NET development who are interested in learning how to incorporate the features of LINQ in new and existing applications.

What You'll Learn

Upon successful completion of this course, students will be able to:
  • Create new XML content using LINQ to XML.
  • Iterate through collections of objects, using a single LINQ query.
  • Use anonymous types, lambda expressions, extension methods, object initializers, and implicit type declaration.
  • Query arrays, lists, dictionaries, and more using LINQ to Objects.
  • Use the extension methods provided by the System.Linq.Enumerable class to extend the behavior of collection classes.
  • Create an object model based on a SQL Server database and then query the database using LINQ to SQL.
  • Modify data and use stored procedures with LINQ to SQL.
  • Create XML content using classes in the System.Xml.Linq namespace.
  • Validate, query and transform XML content using LINQ to XML.
  • Transform XML content using LINQ to XML.
  • Create an Entity Data Model based on a data source and then query the data using LINQ to Entities.
  • Modify data and use stored procedures with LINQ to Entities.

Course Duration

2 Days

Course Outline

  1. Introduction to LINQ
    • Language Integrated Query
    • Structure of a LINQ Query
    • Some LINQ Examples
  2. Language Enhancements for LINQ
    • LINQ and Languages
    • Implicity Typed Local Variables and Object Initializers
    • Lambda Expressions, Extension Methods, and Anonymous Types
  3. LINQ to Objects
    • Using LINQ with in-Memory Collections
    • LINQ Operations and Extension Methods
  4. LINQ to SQL
    • LINQ and Relational Data
    • Creating an Object Model
    • Querying Data
    • Modifying Data
    • Using Stored Procedures
    • LINQ to SQL vs. DataSets
  5. More LINQ to SQL
    • LINQ to SQL Advanced Features
    • Using LINQ to SQL in a Windows Application
    • Using LINQ to SQL in a Web Application
  6. LINQ to DataSet
    • Review of DataSets
    • Querying Data with LINQ to DataSet
    • LINQ to DataSet and DataViews
    • Binding to Data
  7. LINQ to XML
    • Create and Manipulating XML Content
    • Using LINQ to Query XML Content
    • Transforming XML Using LINQ
  8. LINQ to Entities
    • Overview of Entry Framework
    • Creating an Entity Data Model
    • Querying Data
    • Modify Data
    • Using Stored Procedures