What are different flavors of LINQ?

There are following four flavors of LINQ:

  1. LINQ to Objects – It enables you to query any in-memory object like as array, collection and generics types. It offers a new way to query objects with many powerful features like filtering, ordering and grouping with minimum code.
  2. LINQ to ADO.NET – LINQ to ADO.NET is used to query data from different databases like as SQL Server, Oracle, and others. Further, it can be divided into three flavours:-
    • LINQ to SQL (DLINQ) – It is specifically designed to work with only SQL Server database. It is an object-relational mapping (ORM) framework that allows 1-1 mapping of SQL Server database to .NET Classes. These classes are automatically created by the wizard based on database table and we can use these classes immediately.
    • LINQ to Datasets – It is an easy and faster way to query data cached in a Dataset object. This allows you to do further data manipulation operations (like searching, filtering, sorting) on Dataset using LINQ Syntax. It can be used to query and manipulate any database (like Oracle, MySQL, DB2 etc.) that can be query with ADO.NET.
    • LINQ to Entities – In many ways, it looks like LINQ to SQL. It is an object-relational mapping (ORM) framework that allows 1-1 mapping , 1-many mapping and many-many mapping of a database to .NET Classes. Unlike LINQ to SQL, it can be used to query any database (like Oracle, MySQL, and DB2 etc.) including SQL Server. Now, it is called ADO.NET Entity Framework.
  3. LINQ to XML (XLINQ) – This allows you to do different operations on XML data source like querying or reading, modifying, manipulating, and saving changes to XML documents. System.Xml.Linq namespace contains classes for LINQ to XML.
  4. Parallel LINQ (PLINQ) – PLINQ was introduced with .NET Framework 4.0. It is a parallel implementation of LINQ to Objects. PLINQ use the power of parallel programming which targets the Task Parallel Library. PLINQ helps you to write a LINQ query which will be execute simultaneously or parallel on different processors.