The first 200 students can use code LAUNCH20 to get 20% off our new 4 courses Deep Dive: Blazor, From Zero to Hero: Event-Driven Architecture, Getting Started: ASP.NET Core and Getting Started: Event Sourcing

From Zero to Hero: LINQ in .NET

Everything you need to master the art of LINQ in .NET

C# 3 added one of the most revolutionary features of any programming language, and that's none other than LINQ. LINQ has been a flagship feature of C#. Data querying is a fundamental feature of any programming language, but not every language gives developers the tools to do it in an elegant way that reads naturally and is extremely powerful. Even though most developers will get introduced to LINQ early in their C# journey, only a few know how to use it effectively and get the most out of it with the least amount of code. With heavy Microsoft investment, LINQ is improving in every .NET version with better performance and adding new features. In this course, Hannes Lowette will teach you everything there is to know about LINQ and equip you with the knowledge to tackle and querying tasks, whether big or small.

Curriculum

Welcome (00:35)

What will you learn in this course? (00:34)

Who is the course for and prerequisites (00:32)

Why do we have LINQ? (05:36)

A language for querying data (02:02)

A first LINQ example (05:21)

Why would you want to use LINQ? (03:34)

Section recap (00:37)

Introduction to our demo solution (03:05)

Using a simple where clause (04:29)

Refactoring statements into functions (03:45)

Chaining multiple where clauses (03:18)

Ordering data (04:00)

Multi-level ordering (03:24)

Using a custom comparer to order (02:56)

Section recap (00:54)

What is deferred execution in LINQ? (09:33)

Retrieving all results (09:48)

Retrieving a single item (10:40)

Projecting the data to another shape (11:22)

Section recap (00:43)

Introduction to getting partial results (02:57)

Splitting results into chunks (06:20)

Using Skip, Take and TakeWhile to retrieve a specific result (07:30)

Dividing results into logical parts with GroupBy (07:30)

Section recap (00:55)

Introduction (02:00)

Removing duplicates (03:10)

Checking for a single item (03:09)

Verifying all items (04:10)

Using aggregate functions (09:51)

Checking if 2 sequences are equal (02:51)

Section recap (00:39)

Introduction (01:26)

Concatenate two results (01:50)

Set operations on queries with the same type (10:02)

Exploding a subquery with SelectMany (07:00)

Join operations between 2 results (25:25)

Section recap (00:42)

Introduction (01:02)

IQueryable vs IEnumerable (04:38)

What can we write LINQ against? (03:48)

Making some IEnumerable methods ourselves (09:07)

IQueryable behind the scenes (10:47)

Section recap (01:12)

Why would we want to parallelize our queries? (02:26)

Introduction to PLINQ (14:19)

Things to consider when using PLINQ (06:47)

Potential pitfalls (07:44)

Section recap (00:58)

Conclusion (01:24)

Course Info

Level:
From Zero to Hero
Duration:
4h 9m
Rating (2,8K+):
star

Lifetime access

Add to Cart
Dometrain Pro

Want access to all of our courses? Subscribe to Dometrain Pro!

Try it for free!

About the Author

author_img

Hannes Lowette

With 20 years in .NET development, Hannes has always been passionate about performance, databases, distributed systems and large-scale applications. When it comes to architecture, his opinions have become a bit more nuanced, and the "it depends" card, however boring, gets played in many technical discussions. Hannes has always had a passion for sharing knowledge. It doesn't matter whether it is one-to-one while pair programming, on a conference stage giving a talk or when he's helping people succeed in their careers as a coach. In his free time, when he's not building LEGO® castles with his three kids, he likes to stream his guitar building on Twitch and spends too much time playing online chess and doing all-around geeky stuff. You can always lure him into a chat over a glass of great Whisky.

More courses by Hannes Lowette