This topic has not yet been rated - Rate this topic

DbProviderServices Class

Represents a set of methods for creating correct command definition objects and accessing provider manifest information.

This API is not CLS-compliant. 
System.Object
  System.Data.Common.DbProviderServices

Namespace:  System.Data.Common
Assembly:  System.Data.Entity (in System.Data.Entity.dll)
[CLSCompliantAttribute(false)]
public abstract class DbProviderServices

The DbProviderServices type exposes the following members.

  Name Description
Protected method DbProviderServices Initializes a new instance of a DbProviderServices class.
Top
  Name Description
Public method CreateCommandDefinition(DbCommand) Creates a DbCommandDefinition that uses the specified DbCommand.
Public method CreateCommandDefinition(DbCommandTree) Creates a command definition object from the specified command tree.
Public method CreateCommandDefinition(DbProviderManifest, DbCommandTree) Creates a DbCommandDefinition object from a command tree.
Public method CreateDatabase Creates a database indicated by connection and creates schema objects (tables, primary keys, foreign keys) based on the contents of a StoreItemCollection.
Public method CreateDatabaseScript Generates a data definition langauge (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.
Protected method CreateDbCommandDefinition Creates a command definition object for the specified provider manifest and command tree.
Public method DatabaseExists Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.
Protected method DbCreateDatabase Creates a database indicated by connection and creates schema objects (tables, primary keys, foreign keys) based on the contents of a StoreItemCollection.
Protected method DbCreateDatabaseScript Generates a data definition langauge (DDL script that creates schema objects (tables, primary keys, foreign keys) based on the contents of the StoreItemCollection parameter and targeted for the version of the database corresponding to the provider manifest token.
Protected method DbDatabaseExists Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.
Protected method DbDeleteDatabase Deletes all store objects specified in the store item collection from the database and the database itself.
Public method DeleteDatabase Deletes all store objects specified in the store item collection from the database and the database itself.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected method GetDbProviderManifest When overridden in a derived class, returns an instance of a class that derives from the DbProviderManifest.
Protected method GetDbProviderManifestToken Returns provider manifest token given a connection.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method Static member GetProviderFactory Retrieves the DbProviderFactory based on the specified DbConnection.
Public method GetProviderManifest Returns the provider manifest by using the specified version information.
Public method GetProviderManifestToken Returns provider manifest token.
Public method Static member GetProviderServices Returns providers given a connection.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top

The DBProviderServices class is the starting point for accessing the SQL generation layer to convert command trees into DbCommands. This class also provides additional data storage information, such as the provider manifest, which describes storage-specific type mappings and functions, and the storage-specific mapping files to generate queries for table and column information.

DbProviderServices provides access to the provider manifest, which encapsulates the provider types, their mapping to EDM primitive types, the provider functions and the mapping files for the store schema definition.

DbProviderServices also serves as an entry point for passing a query of modification command tree (DbQueryCommandTree or DbModificationCommandTree) to the provider, which let the provider generate a store specific command. To support this functionality, providers supporting a relational store with SQL 99 compliant querying capabilities would typically contain a module that is responsible for generating a backend specific command text based on a given command tree. That module would typically consist of a component for handling query SQL generation and a component for handing modification SQL generation.

.NET Framework

Supported in: 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ