语言

IMigrationsDatabaseLock.ReacquireIfNeeded 方法

定义

如果当前数据库已释放,则再次获取数据库的独占锁。

public virtual Microsoft.EntityFrameworkCore.Migrations.IMigrationsDatabaseLock ReacquireIfNeeded(bool connectionReopened, bool? transactionRestarted);
abstract member ReacquireIfNeeded : bool * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.IMigrationsDatabaseLock
override this.ReacquireIfNeeded : bool * Nullable<bool> -> Microsoft.EntityFrameworkCore.Migrations.IMigrationsDatabaseLock
Public Overridable Function ReacquireIfNeeded (connectionReopened As Boolean, transactionRestarted As Nullable(Of Boolean)) As IMigrationsDatabaseLock

参数

connectionReopened
Boolean

指示连接是否已重新打开。

transactionRestarted
Nullable<Boolean>

指示事务是否已重启。 null 如果没有当前事务。

返回

可以释放以释放锁的对象。

适用于