Chapter 13. Strongly Typed DataSets

Strongly typed DataSets are a collection of classes that inherit from the DataSet, DataTable, and DataRow classes, and provide additional properties, methods, and events based on the DataSet schema. These methods, properties, and events allow, among other things, named properties and methods to be used to retrieve column values, access parent and child records, find rows, and handle null column values.

It is important to remember that strongly typed DataSets are in fact just a collection of classes. Because the strongly typed DataSet classes inherit from DataSet, DataTable, and DataRow, all the functionality present in those classes can be used just as it is for the untyped classes. The development environment just provides a way to automatically generate consistent and efficient strongly typed DataSet classes.

Using a strongly typed DataSet has a number of advantages over using untyped DataSet:

There are some drawbacks to using strongly typed DataSet objects:

This chapter discusses how to create strongly typed DataSets and describes some of their added functionality. Examples that demonstrate how to use the extended functionality are presented.