Wednesday, January 16, 2008

Architecture of LINQ

LINQ consists of three major components:

*LINQ to Objects
*LINQ to ADO.NET, which includes
*LINQ to SQL (formerly called DLinq)
*LINQ to DataSet (formerly called LINQ over DataSet)
*LINQ to Entities
*LINQ to XML (formerly called XLinq)

The folloing figure depicts the LINQ architecture which clearly shows the various components of LINQ and their related data stores.



LINQ to Objects deals with in-memory data. Any class that implements the IEnumerable interface (in the System.Collections.Generic namespace) can be queried with Standard Query Operators.

LINQ to ADO.NET (also known as LINQ enabled ADO .NET) deals data from external sources, basically anything ADO.NET can connect to. Any class that implements IEnumerableor IQueryable (in the System.Query namespace) can be queried with Standard Query Operators. The LINQ to ADO.NET functionality could be achieved by using System.Data.Linq namespace.

LINQ to XML is a comprehensive API for in-memory XML programming. Like the rest of LINQ, it includes Standard Query Operators, and it can also be used in concert with LINQ to ADO.NET, but its primary purpose is to unify and simplify the kinds of things that disparate XML tools, like XQuery, XPath and XSLT are typically used to do. The LINQ to XML functionality could be achieved by using System.Xml.Linq namespace.

No comments:

Post a Comment