Yet, with all that flexibility there has not been, up to this point, a means or method for querying
data contained within a DataSet (there are a few methods on the DataTable class which will be
discussed below). This is where LINQ and LINQ to DataSets come in. With the querying power
of LINQ, LINQ to DataSets provides a full set of query capabilities for a developer to quickly and
easily query the contents of a DataSet.
This chapter deals specifically with how to work with LINQ to DataSets, and covers the following
topics:
??‘ Loading data into a DataSet
??‘ Querying DataSets with LINQ to DataSet
??‘ Data binding
??‘ Comparing rows in DataSets
Part III: LINQ to SQL
Overview of LINQ to DataSet
Perhaps the only thing that ADO.NET DataSets lack when it comes to functionality is an adequate query
capability. DataSets do everything else quite well, but from a query perspective, they are limited. Sure,
they have the Select, GetParentRow, and GetChildRows methods, but these provide only basic querying
features.
Microsoft recognized these shortcomings and has provided the capability to query the contents of a
DataSet through LINQ to DataSet.
Pages:
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437