LINQ Basics

Work with collections more effectively using SQL-like queries.


The need to filter, sort, and perform various operations with collections and data sources is quite common. For ease of use, .NET has LINQ, which lets us perform SQL-like queries to data sources.

There are several varieties of LINQ, including:

  • LINQ to Objects: This is used to work with .NET collections.
  • LINQ to Entities: This is used to work with database tables through Entity Framework.
  • LINQ to SQL: This is used to work with Microsoft SQL Server.

Get hands-on with 1200+ tech skills courses.