DbProviderServices Class

Definition

The factory for building command definitions; use the type of this object as the argument to the IServiceProvider.GetService method on the provider factory;

public abstract class DbProviderServices : System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver
type DbProviderServices = class
    interface IDbDependencyResolver
Public MustInherit Class DbProviderServices
Implements IDbDependencyResolver
Inheritance
DbProviderServices
Derived
Implements

Constructors

DbProviderServices()

Constructs an EF provider that will use the IDbDependencyResolver obtained from the app domain DbConfiguration Singleton for resolving EF dependencies such as the DbSpatialServices instance to use.

Methods

AddDependencyResolver(IDbDependencyResolver)

Adds an IDbDependencyResolver that will be used to resolve additional default provider services when a derived type is registered as an EF provider either using an entry in the application's config file or through code-based registration in DbConfiguration.

CloneDbCommand(DbCommand)

See issue 2390 - cloning the DesignTimeVisible property on the DbCommand can cause deadlocks. So here allow sub-classes to override.

CloneDbConnection(DbConnection)

Clones the connection.

CloneDbConnection(DbConnection, DbProviderFactory)

Clones the connection.

CreateCommandDefinition(DbCommand)

Create the default DbCommandDefinition object based on the prototype command This method is intended for provider writers to build a default command definition from a command. Note: This will clone the prototype

CreateCommandDefinition(DbCommandTree)

Create a Command Definition object given a command tree.

CreateCommandDefinition(DbProviderManifest, DbCommandTree)

Creates command definition from specified manifest and command tree.

CreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Creates a database indicated by connection and creates schema objects (tables, primary keys, foreign keys) based on the contents of storeItemCollection.

CreateDatabaseScript(String, StoreItemCollection)

Generates a data definition language (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.

CreateDbCommandDefinition(DbProviderManifest, DbCommandTree)

Creates a command definition object for the specified provider manifest and command tree.

DatabaseExists(DbConnection, Nullable<Int32>, Lazy<StoreItemCollection>)

Returns a value indicating whether a given database exists on the server.

DatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

Returns a value indicating whether a given database exists on the server.

DbCreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Creates a database indicated by connection and creates schema objects (tables, primary keys, foreign keys) based on the contents of a StoreItemCollection.

DbCreateDatabaseScript(String, StoreItemCollection)

Generates a data definition language (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.

DbDatabaseExists(DbConnection, Nullable<Int32>, Lazy<StoreItemCollection>)

Returns a value indicating whether a given database exists on the server.

DbDatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

Returns a value indicating whether a given database exists on the server.

DbDeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Deletes the specified database.

DbGetSpatialServices(String)
Obsolete.

Gets the spatial services for the DbProviderServices.

DeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Deletes the specified database.

ExpandDataDirectory(String)

Expands |DataDirectory| in the given path if it begins with |DataDirectory| and returns the expanded path, or returns the given string if it does not start with |DataDirectory|.

GetConceptualSchemaDefinition(String)

Return an XML reader which represents the CSDL description

GetDbProviderManifest(String)

When overridden in a derived class, returns an instance of a class that derives from the DbProviderManifest.

GetDbProviderManifestToken(DbConnection)

Returns provider manifest token for a given connection.

GetDbSpatialDataReader(DbDataReader, String)

Gets the spatial data reader for the DbProviderServices.

GetExecutionStrategy(DbConnection)

Gets the IDbExecutionStrategy that will be used to execute methods that use the specified connection.

GetExecutionStrategy(DbConnection, String)

Gets the IDbExecutionStrategy that will be used to execute methods that use the specified connection. This overload should be used by the derived classes for compatability with wrapping providers.

GetProviderFactory(DbConnection)

Retrieves the DbProviderFactory based on the specified DbConnection.

GetProviderManifest(String)

Returns the provider manifest by using the specified version information.

GetProviderManifestToken(DbConnection)

Returns provider manifest token given a connection.

GetProviderServices(DbConnection)

Returns providers given a connection.

GetService(Type, Object)

Called to resolve additional default provider services when a derived type is registered as an EF provider either using an entry in the application's config file or through code-based registration in DbConfiguration. The implementation of this method in this class uses the resolvers added with the AddDependencyResolver method to resolve dependencies.

GetServices(Type, Object)

Called to resolve additional default provider services when a derived type is registered as an EF provider either using an entry in the application's config file or through code-based registration in DbConfiguration. The implementation of this method in this class uses the resolvers added with the AddDependencyResolver method to resolve dependencies.

GetSpatialDataReader(DbDataReader, String)

Gets the spatial data reader for the DbProviderServices.

GetSpatialServices(DbProviderInfo)

Gets the spatial services for the DbProviderServices.

GetSpatialServices(String)
Obsolete.

Gets the spatial services for the DbProviderServices.

RegisterInfoMessageHandler(DbConnection, Action<String>)

Registers a handler to process non-error messages coming from the database provider.

SetDbParameterValue(DbParameter, TypeUsage, Object)

Sets the parameter value and appropriate facets for the given TypeUsage.

SetParameterValue(DbParameter, TypeUsage, Object)

Sets the parameter value and appropriate facets for the given TypeUsage.

Extension Methods

GetService(IDbDependencyResolver, Type)

Calls GetService(Type, Object) passing the given type argument and using null for the name argument.

GetService<T>(IDbDependencyResolver)

Calls GetService(Type, Object) passing the generic type of the method as the type argument and null for the name argument.

GetService<T>(IDbDependencyResolver, Object)

Calls GetService(Type, Object) passing the generic type of the method and the given name as arguments.

GetServices(IDbDependencyResolver, Type)

Calls GetServices(Type, Object) passing the given type argument and using null for the name argument.

GetServices<T>(IDbDependencyResolver)

Calls GetServices(Type, Object) passing the generic type of the method as the type argument and null for the name argument.

GetServices<T>(IDbDependencyResolver, Object)

Calls GetServices(Type, Object) passing the generic type of the method and the given name as arguments.

Applies to