One of the hottest feature that comes with Visual Studio 2008 and the .NET Framework 3.5 is certainly LINQ, the new .NET component that adds native data querying capabilities to the .NET language, by using a SQL-like sintax.
LINQ has threemain providers:
- LINQ to Objects: the LINQ to Objects provider is used for querying in-memory collections, using the local query execution engine of LINQ. The code generated by this provider refer the implementations of the standard query operators as defined in the
Sequence class and allows IQueryable<T> collections to be queried locally. LINQ to Objects is not dynamic. Once a result set has been created and used, any changes to the source collection do not reflect automatically on the result set. - LINQ to XML: the LINQ to XML provider converts an XML document to a collection of
XElement objects, which are then queried against using the local execution engine that is provided as a part of the implementation of the standard query operator. - LINQ to SQL: the LINQ to SQL provider allows LINQ to be used to query SQL Server databases. Since SQL Server data resides on a remote server, and because it already includes a querying engine, LINQ to SQL does not use the query engine of LINQ. Instead, it converts a LINQ query to SQL query which is then sent to SQL Server for processing.
LINQ is a powerful tool that must be well understood in order to work with all the features provided by the new .NET 3.5 Framework.
A good tool that helps you to understand and test LINQ is certainly LINQPad, a nice winform application that permits you to work with LINQ directly via an interface similar to SQL Management Studio.
This is a recommended tool for learning and for testing... give it a try!
Technorati Tag:
.NET,
LINQ