RelationalDatabaseFacadeExtensions.UseTransaction 方法

定义

重载

UseTransaction(DatabaseFacade, DbTransaction)

DbTransaction设置 要由 上的DbContext数据库操作使用的 。

UseTransaction(DatabaseFacade, DbTransaction, Guid)

DbTransaction设置 要由 上的DbContext数据库操作使用的 。

UseTransaction(DatabaseFacade, DbTransaction)

Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs

DbTransaction设置 要由 上的DbContext数据库操作使用的 。

public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction transaction);
public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction? transaction);
static member UseTransaction : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Data.Common.DbTransaction -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
<Extension()>
Public Function UseTransaction (databaseFacade As DatabaseFacade, transaction As DbTransaction) As IDbContextTransaction

参数

databaseFacade
DatabaseFacade

DatabaseFacade上下文的 。

transaction
DbTransaction

要使用的 DbTransaction

返回

封装 IDbContextTransaction 给定事务的 。

注解

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

适用于

UseTransaction(DatabaseFacade, DbTransaction, Guid)

Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs
Source:
RelationalDatabaseFacadeExtensions.cs

DbTransaction设置 要由 上的DbContext数据库操作使用的 。

public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction UseTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction transaction, Guid transactionId);
public static Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction? UseTransaction (this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.Data.Common.DbTransaction? transaction, Guid transactionId);
static member UseTransaction : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * System.Data.Common.DbTransaction * Guid -> Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction
<Extension()>
Public Function UseTransaction (databaseFacade As DatabaseFacade, transaction As DbTransaction, transactionId As Guid) As IDbContextTransaction

参数

databaseFacade
DatabaseFacade

DatabaseFacade上下文的 。

transaction
DbTransaction

要使用的 DbTransaction

transactionId
Guid

事务的唯一标识符。

返回

封装 IDbContextTransaction 给定事务的 。

注解

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

适用于