Chapter 6. Querying DataTables with LINQ to DataSet

LINQ to DataSet is probably the least used of Visual Studio 2008's four initial Microsoft LINQ implementations. Most .NET developers who've adopted business object architecture and LINQ for new applications substitute List<T> or other generic collections for DataTables and LINQ to SQL's DataContext or the Entity Framework's ObjectContext objects for DataSets and TableAdapters. However, there are millions of lines of VB 8.0 or C# 2.0 or earlier code in data-intensive, production Windows or Web-based .NET projects that use DataSets. The in-memory DataSet has been Microsoft's preferred relational data manipulation technology since ADO.NET 1.0's arrival with VS 2002's release to manufacturing (RTM) in early 2002.

The ADO.NET team designed a complete infrastructure of wizards and components devoted to codeless or almost codeless, drag-and-drop databinding to basic Windows form controls such as labels and text, combo boxes, and list boxes, as well as complex-bound DataGridView controls with BindingSource components. The Configure Data Source Wizard lets programmers materialize typed DataSet data sources from databases, SOAP Web services, or objects with a few mouse clicks. Similarly, ASP.NET developers implemented SqlDataSource, AccessDataSource, XmlDataSource, and ObjectDataSource components for binding data to basic HTML controls and specialized GridView, DetailsView, FormView, DataList, ListView, and Repeater server controls.

This chapter ...

Get Professional ADO.NET 3.5 with LINQ and the Entity Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.