DatabaseFacade.BeginTransaction 方法

定义

启动新事务。

public virtual Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction BeginTransaction ();
abstract member BeginTransaction : unit -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
override this.BeginTransaction : unit -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
Public Overridable Function BeginTransaction () As IDbContextTransaction

返回

一个 IDbContextTransaction ,它表示已启动的事务。

注解

有关详细信息和示例,请参阅 EF Core 中的事务

适用于