共用方式為


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 中的交易

適用於