Where Linq Fits Into Your Toolbelt Slides
Where Linq Fits Into Your Toolbelt Slides
Paul D. Sheriff
Business / IT Consultant
[email protected] www.pdsa.com
Version Check
This course was created by using:
- .NET 6
- C# 10
- Visual Studio Code 1
- Visual Studio 2022
Version Check
This course is 100% applicable to:
- .NET 6
- C# 10
- Visual Studio Code 1
- Visual Studio 2022
Advantages of using LINQ
Select and order data
Search for data
Course Goals
Extract subsets of data
What is in common within items in
collections
What is in common between collections
Join and group data
Aggregate data using Min(), Max(), Sum(),
etc.
Understand how deferred execution works
I assume you…
- Are a C# developer
- Are familiar with VS Code or Visual Studio
- New to using LINQ
Prerequisites
- C# Generics
- C# Delegates, Lambda Expressions
- C# Extension Methods
About This Course
What's in This Course
https://github.com/PaulDSheriff/LINQFundamentalsCSharp10
https://docs.microsoft.com/en-us/dotnet/csharp/programming-
guide/concepts/linq/
https://docs.microsoft.com/en-us/samples/dotnet/try-samples/101-
linq-samples/
Any array
Pluralsight Course:
Pluralsight Course:
Getting Started with
Working with XML in C#
Entity Framework 6
LINQ to Objects
list.Add(product);
if (!list.Contains(product.Color)) {
list.Add(product.Color);
ret = product.ListPrice;
SQL LINQ
SQL LINQ
Type-checking of objects at
IntelliSense support
compile time
What Can You Do With LINQ?
LINQ Operations
Order
Projection
Select (ascending /
(change shape)
descending)
Get an Element
Filter
(find, first, last,
(where)
single)
LINQ Operations
Joining Grouping
(inner joins, outer joins) (groupby, subquery, groupjoin)