Chapter 18. Using LINQ to DataSet

After completing this chapter, you will be able to:

  • Prepare a DataTable instance so that it uses the IEnumerable interface

  • Treat ADO.NET table values as first-class members of a LINQ query

  • Cast type-neutral column values as strongly typed query values

LINQ processes data from a variety of sources, but those sources must first be expressed in a form that LINQ can use. For instance, LINQ expects that all incoming data be stored in a collection, one that conforms to either the IEnumerable(Of T) or the IQueryable(Of T) interface.

The LINQ to DataSet provider endows ordinary ADO.NET DataTable objects with the ability to participate fully in LINQ queries. It does this by adding the necessary LINQ requirements to relevant ...

Get Microsoft® ADO.NET 4 Step by Step 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.