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 中的事务

适用于