Chapter 35. The System.Data.Common Namespace

This namespace includes some of the base classes that define common ADO.NET functionality for provider-specific objects. For example, you’ll find DataAdapter, which is the root for classes such as System.Data.SqlClient.SqlDataAdapter and System.Data.OleDb.OleDbDataAdapter. However, many connection-specific classes don’t derive from a base class. Instead, they implement a common interface, such as System.Data.IDbConnection (implemented by System.Data.SqlClient.SqlConnection and System.Data.OleDb.OleDbConnection).

The System.Data.Common namespace does include a few classes that are generic to all data providers. Namely, these are the DataColumnMapping and DataTableMapping classes, which allow you to map table names and column names in the DataSet. These classes are used by the provider-specific objects but are completely generic. Figure 35-1 shows the types in this namespace.

The System.Data.Common namespace
Figure 35-1. The System.Data.Common namespace

Get ADO.NET in a Nutshell 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.