RelationalDatabaseFacadeExtensions RelationalDatabaseFacadeExtensions Class

Definition

public static class RelationalDatabaseFacadeExtensions
Public Module RelationalDatabaseFacadeExtensions
Inheritance
System.ObjectSystem.Object
RelationalDatabaseFacadeExtensionsRelationalDatabaseFacadeExtensions

Methods

BeginTransaction(DatabaseFacade, IsolationLevel) BeginTransaction(DatabaseFacade, IsolationLevel)
BeginTransactionAsync(DatabaseFacade, IsolationLevel, CancellationToken) BeginTransactionAsync(DatabaseFacade, IsolationLevel, CancellationToken)
CloseConnection(DatabaseFacade) CloseConnection(DatabaseFacade)
System.Object.Equals(System.Object) System.Object.Equals(System.Object) Inherited from System.Object
System.Object.Equals(System.Object, System.Object) System.Object.Equals(System.Object, System.Object) Inherited from System.Object
ExecuteSqlCommand(DatabaseFacade, String, Object[]) ExecuteSqlCommand(DatabaseFacade, String, Object())
ExecuteSqlCommandAsync(DatabaseFacade, String, CancellationToken, Object[]) ExecuteSqlCommandAsync(DatabaseFacade, String, CancellationToken, Object())
GetAppliedMigrations(DatabaseFacade) GetAppliedMigrations(DatabaseFacade)

Gets all migrations that have been applied to the target database.

GetAppliedMigrationsAsync(DatabaseFacade, CancellationToken) GetAppliedMigrationsAsync(DatabaseFacade, CancellationToken)

Asynchronously gets all migrations that have been applied to the target database.

GetCommandTimeout(DatabaseFacade) GetCommandTimeout(DatabaseFacade)
GetDbConnection(DatabaseFacade) GetDbConnection(DatabaseFacade)
System.Object.GetHashCode() System.Object.GetHashCode() Inherited from System.Object
GetMigrations(DatabaseFacade) GetMigrations(DatabaseFacade)

Gets all the migrations that are defined in the configured migrations assembly.

GetPendingMigrations(DatabaseFacade) GetPendingMigrations(DatabaseFacade)

Gets all migrations that are defined in the assembly but haven't been applied to the target database.

GetPendingMigrationsAsync(DatabaseFacade, CancellationToken) GetPendingMigrationsAsync(DatabaseFacade, CancellationToken)

Asynchronously gets all migrations that are defined in the assembly but haven't been applied to the target database.

System.Object.GetType() System.Object.GetType() Inherited from System.Object
System.Object.MemberwiseClone() System.Object.MemberwiseClone() Inherited from System.Object
Migrate(DatabaseFacade) Migrate(DatabaseFacade)

Applies any pending migrations for the context to the database. Will create the database if it does not already exist.

Note that this API is mutually exclusive with DbContext.Database.EnsureCreated(). EnsureCreated does not use migrations to create the database and therefore the database that is created cannot be later updated using migrations.

MigrateAsync(DatabaseFacade, CancellationToken) MigrateAsync(DatabaseFacade, CancellationToken)

Asynchronously applies any pending migrations for the context to the database. Will create the database if it does not already exist.

Note that this API is mutually exclusive with DbContext.Database.EnsureCreated(). EnsureCreated does not use migrations to create the database and therefore the database that is created cannot be later updated using migrations.

OpenConnection(DatabaseFacade) OpenConnection(DatabaseFacade)
OpenConnectionAsync(DatabaseFacade, CancellationToken) OpenConnectionAsync(DatabaseFacade, CancellationToken)
System.Object.ReferenceEquals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) Inherited from System.Object
SetCommandTimeout(DatabaseFacade, Nullable<Int32>) SetCommandTimeout(DatabaseFacade, Nullable(Of Int32))
System.Object.ToString() System.Object.ToString() Inherited from System.Object
UseTransaction(DatabaseFacade, DbTransaction) UseTransaction(DatabaseFacade, DbTransaction)