YoVDO

.NET Essentials: Working with LINQ

Offered By: LinkedIn Learning

Tags

.NET Courses C# Courses Data Filtering Courses Data Aggregation Courses LINQ Courses Lambda Expressions Courses

Course Description

Overview

Learn the basics of working with Language-Integrated Query (LINQ), which allows developers to filter, sort, aggregate, and query data directly within C# code.

Syllabus

Introduction
  • Welcome
  • What you should know
  • How to access the sample code on GitHub
1. The Spirit of LINQ
  • Why build a query engine in a programming language?
  • Explore LINQ essential parts
2. Work with LINQPad
  • Why use LINQPad?
  • Initial tour of LINQPad
  • Set destination folder for course examples
  • Explore the expression editor
  • Explore the statements editor
  • Show formatted output with the Dump method
  • Explore the program editor
  • Run a subset of code
3. Key Parts of .NET
  • Implicit variable typing
  • Anonymous types
  • Object initializers
  • Collection initializers
  • Inline code with lambda expressions
  • Extension methods
  • More extension methods
  • Generic types
4. The Parts of a Query
  • What sources are queryable?
  • The Enumerable class
  • Learn how to use the Enumerable static methods
  • Learn how to use the Enumerable extension methods
  • Learn how to use the Query Expression syntax
  • What sources revisited
  • Deferred execution: When does the query run?
  • Combine methods with execution pipelines
  • Combine extension methods and query expressions
5. Generate
  • The Empty and DefaultIfEmpty methods
  • The Repeat method
  • The Range method
6. Basics
  • The three types of query expressions
  • Review query expression clauses
  • Examples of three query expressions
  • The select clause
  • Learn how to use select to project into another type
  • Select into anonymous type
  • Learn how to use expressions with select
  • Challenge: Write select expressions
  • Solution: Write select expressions
  • Index into another sequence
7. Filtering
  • The Where method
  • Learn how to use logical operators with the Where method
  • Explore the OfType class definitions
  • The OfType method
  • Challenge: Filter results with Where
  • Solution: Filter results with Where
8. Aggregation
  • Sum, Average, and other aggregates
  • Create custom aggregates
9. Groups and Other Stuff
  • The GroupBy method
  • GroupBy query expression
  • GroupBy with ElementSelector
  • GroupBy with ResultSelector
  • Iterate over groups
  • Combine two sequences
  • Flatten sequence with SelectMany
  • Challenge: Group results by color values
  • Solution: Group results by color values
10. Element Operations
  • First and Last methods
  • The FirstOrDefault method
  • The ElementAt method
  • Single and SingleOrDefault methods
11. Set Operations
  • The Distinct method
  • The Intersect method
  • The Union method
  • The Except method
  • Find duplicate values
12. Quantify Data
  • Learn how to use the Any method to detect empty sequence
  • Learn how to use Any method to determine if element exists
  • The Contains method
  • The All method
13. Partition
  • Skip and Take methods
  • Conditional Skip and Take methods
14. Other
  • Learn how to use LINQ in a .NET application
  • Learn how to use MoreLinq for extended query syntax
  • Additional MoreLinq examples
Continue Your Journey
  • Next steps

Taught by

Walt Ritscher

Related Courses

Introduction to Functional Programming
Delft University of Technology via edX
MongoDB for .NET Developers
MongoDB University
基于.Net的Web开发技术
Xi'an Jiaotong University via Coursera
Web Development with ASP.NET C# and Entity Framework Code-First
Canvas Network
Blazor and JavaScript Interoperability
Coursera Project Network via Coursera