Provider Independent Model Overview 

The programming model for the Provider Independent Model is based on the use of the Factory design pattern and provides a single API to access databases across multiple providers. This pattern is aptly named, as it calls for the use of a specialized object solely to create other objects, much like a real-world factory. For more information about the Factory design pattern, see "Exploring the Factory Design Pattern" at msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/factopattern.asp.

When you create a DbProviderFactory instance, passing it information about the provider along with the connection string, the instance can determine the correct strongly-typed object to return based on the information it has been provided. This lets you write code that is not dependent on the data provider and lets you choose the provider at runtime.

The System.Data.Common Namespace

The System.Data.Common namespace contains classes shared by the .NET Framework data providers. Data providers describe collections of classes used to access data sources. Members include the following:

  • DataAdapter

  • DbCommand

  • DbCommandBuilder

  • DbConnection

  • DbDataAdapter

  • DbDataReader

  • DbDataSourceEnumerator

  • DbEnumerator

  • DbException

  • DbMetaDataCollectionNames

  • DbMetaDataColumnNames

  • DbParameter

  • DbParameterCollection

  • DbProviderConfigurationHandler

  • DbProviderFactories

  • DbProviderFactoriesConfigurationHandler

  • DbProviderFactory

  • DbTransaction

See Also

Concepts

Working with Factories