DbProviderServices DbProviderServices 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
DbProviderServicesDbProviderServicesDbProviderServices
Derived
Implements

Constructors

DbProviderServices() DbProviderServices() 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) AddDependencyResolver(IDbDependencyResolver) 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) CloneDbCommand(DbCommand) CloneDbCommand(DbCommand)

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

CloneDbConnection(DbConnection) CloneDbConnection(DbConnection) CloneDbConnection(DbConnection)

Clones the connection.

CloneDbConnection(DbConnection, DbProviderFactory) CloneDbConnection(DbConnection, DbProviderFactory) CloneDbConnection(DbConnection, DbProviderFactory)

Clones the connection.

CreateCommandDefinition(DbCommand) CreateCommandDefinition(DbCommand) 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) CreateCommandDefinition(DbCommandTree) CreateCommandDefinition(DbCommandTree)

Create a Command Definition object given a command tree.

CreateCommandDefinition(DbProviderManifest, DbCommandTree) CreateCommandDefinition(DbProviderManifest, DbCommandTree) CreateCommandDefinition(DbProviderManifest, DbCommandTree)

Creates command definition from specified manifest and command tree.

CreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection) CreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection) 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) CreateDatabaseScript(String, 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) CreateDbCommandDefinition(DbProviderManifest, DbCommandTree) CreateDbCommandDefinition(DbProviderManifest, DbCommandTree)

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

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

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

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

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

DbCreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection) DbCreateDatabase(DbConnection, Nullable<Int32>, StoreItemCollection) 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) DbCreateDatabaseScript(String, 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>, StoreItemCollection) DbDatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection) DbDatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection)

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

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

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

DbDeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection) DbDeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection) DbDeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Deletes the specified database.

DbGetSpatialServices(String) DbGetSpatialServices(String) DbGetSpatialServices(String)

Gets the spatial services for the DbProviderServices.

DeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection) DeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection) DeleteDatabase(DbConnection, Nullable<Int32>, StoreItemCollection)

Deletes the specified database.

ExpandDataDirectory(String) ExpandDataDirectory(String) 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) GetConceptualSchemaDefinition(String) GetConceptualSchemaDefinition(String)

Return an XML reader which represents the CSDL description

GetDbProviderManifest(String) GetDbProviderManifest(String) GetDbProviderManifest(String)

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

GetDbProviderManifestToken(DbConnection) GetDbProviderManifestToken(DbConnection) GetDbProviderManifestToken(DbConnection)

Returns provider manifest token for a given connection.

GetDbSpatialDataReader(DbDataReader, String) GetDbSpatialDataReader(DbDataReader, String) GetDbSpatialDataReader(DbDataReader, String)

Gets the spatial data reader for the DbProviderServices.

GetExecutionStrategy(DbConnection) GetExecutionStrategy(DbConnection) GetExecutionStrategy(DbConnection)

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

GetExecutionStrategy(DbConnection, String) GetExecutionStrategy(DbConnection, String) 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) GetProviderFactory(DbConnection) GetProviderFactory(DbConnection)

Retrieves the DbProviderFactory based on the specified DbConnection.

GetProviderManifest(String) GetProviderManifest(String) GetProviderManifest(String)

Returns the provider manifest by using the specified version information.

GetProviderManifestToken(DbConnection) GetProviderManifestToken(DbConnection) GetProviderManifestToken(DbConnection)

Returns provider manifest token given a connection.

GetProviderServices(DbConnection) GetProviderServices(DbConnection) GetProviderServices(DbConnection)

Returns providers given a connection.

GetService(Type, Object) GetService(Type, Object) 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) GetServices(Type, Object) 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) GetSpatialDataReader(DbDataReader, String) GetSpatialDataReader(DbDataReader, String)

Gets the spatial data reader for the DbProviderServices.

GetSpatialServices(DbProviderInfo) GetSpatialServices(DbProviderInfo) GetSpatialServices(DbProviderInfo)

Gets the spatial services for the DbProviderServices.

GetSpatialServices(String) GetSpatialServices(String) GetSpatialServices(String)

Gets the spatial services for the DbProviderServices.

RegisterInfoMessageHandler(DbConnection, Action<String>) RegisterInfoMessageHandler(DbConnection, Action<String>) RegisterInfoMessageHandler(DbConnection, Action<String>)

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

SetDbParameterValue(DbParameter, TypeUsage, Object) SetDbParameterValue(DbParameter, TypeUsage, Object) SetDbParameterValue(DbParameter, TypeUsage, Object)

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

SetParameterValue(DbParameter, TypeUsage, Object) SetParameterValue(DbParameter, TypeUsage, Object) SetParameterValue(DbParameter, TypeUsage, Object)

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

Extension Methods

GetService(IDbDependencyResolver, Type) GetService(IDbDependencyResolver, Type) GetService(IDbDependencyResolver, Type)

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

GetService<T>(IDbDependencyResolver) GetService<T>(IDbDependencyResolver) 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) GetService<T>(IDbDependencyResolver, Object) GetService<T>(IDbDependencyResolver, Object)

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

GetServices(IDbDependencyResolver, Type) GetServices(IDbDependencyResolver, Type) GetServices(IDbDependencyResolver, Type)

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

GetServices<T>(IDbDependencyResolver) GetServices<T>(IDbDependencyResolver) 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) GetServices<T>(IDbDependencyResolver, Object) GetServices<T>(IDbDependencyResolver, Object)

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

Applies to