Search⌘ K
AI Features

Writing LINQ Expressions

Understand the components of LINQ and how to write LINQ expressions using extension methods and LINQ providers. Learn the importance of deferred execution and how to execute LINQ queries effectively in C# applications.

Although we wrote a few LINQ expressions, they weren’t the focus, so we didn’t understand properly how LINQ works. Let’s now take time to properly understand LINQ expressions.

What makes LINQ?

LINQ has several parts; some are required, and some are optional:

  • Extension methods (required): These include examples such as Where, OrderBy, and Select. These are what provide the functionality of LINQ.

  • LINQ providers (required): These include LINQ to Objects for processing ...