Share via


IDatabaseProvider Interface

Definition

The primary point where a database provider can tell EF that it has been selected for the current context and provide the services required for it to function.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public interface IDatabaseProvider
type IDatabaseProvider = interface
Public Interface IDatabaseProvider
Derived

Remarks

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

See Implementation of database providers and extensions for more information and examples.

Properties

Name

The unique name used to identify the database provider. This should be the same as the NuGet package name for the providers runtime.

Version

The value of the InformationalVersion for the database provider assembly.

Methods

GetProviderServices(IServiceProvider)

Gets the base set of services required by EF for the database provider to function.

IsConfigured(IDbContextOptions)

Gets a value indicating whether this database provider has been configured for a given context.

Applies to