共用方式為


RelationalDatabaseFacadeExtensions.BeginTransaction 方法

定義

使用指定的 IsolationLevel 啟動新的交易。

public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction BeginTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.IsolationLevel isolationLevel);
static member BeginTransaction : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Data.IsolationLevel -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
<Extension()>
Public Function BeginTransaction (databaseFacade As DatabaseFacade, isolationLevel As IsolationLevel) As IDbContextTransaction

參數

databaseFacade
DatabaseFacade

DatabaseFacade內容的 。

isolationLevel
IsolationLevel

要使用的 IsolationLevel

傳回

IDbContextTransaction 表示已啟動的交易。

備註

如需詳細資訊和範例,請參閱 EF Core 中的交易

適用於