Language Integrated Query or LINQ for short, is described by Microsoft as "a set of technologies based on the integration of query capabilities directly into the C# language". When used right, it can result in some very powerful and readable code, delivering value and solutions faster.
LINQ is an important part of the .NET ecosystem, regularly receiving large improvements. Performance was a major focus for LINQ in the .NET 7 release which Nick Chapsas summarised:
Video: Nick Chapsas summarised the upgrades included in .NET 7 (11 min)
Here is a series of Rules on how to get the most out of LINQ.
This is the golden rule of LINQ. You generally have no idea how big the IEnumerable might be, so where possible just iterate through, don't force it into an array or list before doing that.
Due to LINQ expressions being lazy executed, it is a important to avoid re-evaluating the expression. For LINQ extension methods, this is critically important.
Many LINQ methods like Count, First and so on include an optional filter parameter. It's normally much more readable to use this than add an extra call to Where
How LINQ has evolved:
LINQ is a super powerful toolkit, letting you get your business logic implemented in .NET using a standard set of operations. While it may be tempting to use it in every scenario, it's important to remember to profile and benchmark any code that is time sensitive for your application.