IRelationalTransactionFactory.Create 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Create(IRelationalConnection, DbTransaction, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, Boolean)
创建一个 RelationalTransaction 实例。
public Microsoft.EntityFrameworkCore.Storage.RelationalTransaction Create (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbTransaction transaction, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> logger, bool transactionOwned);
abstract member Create : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> * bool -> Microsoft.EntityFrameworkCore.Storage.RelationalTransaction
Public Function Create (connection As IRelationalConnection, transaction As DbTransaction, logger As IDiagnosticsLogger(Of DbLoggerCategory.Database.Transaction), transactionOwned As Boolean) As RelationalTransaction
参数
- connection
- IRelationalConnection
与数据库的连接。
- transaction
- DbTransaction
基础 DbTransaction。
要写入的记录器。
- transactionOwned
- Boolean
一个 值,该值指示事务是否由此类拥有 (即,当此类被释放) 时是否可以释放它。
返回
新 RelationalTransaction 实例。
适用于
Create(IRelationalConnection, DbTransaction, Guid, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, Boolean)
创建一个 RelationalTransaction 实例。
public Microsoft.EntityFrameworkCore.Storage.RelationalTransaction Create (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbTransaction transaction, Guid transactionId, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> logger, bool transactionOwned);
abstract member Create : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbTransaction * Guid * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> * bool -> Microsoft.EntityFrameworkCore.Storage.RelationalTransaction
Public Function Create (connection As IRelationalConnection, transaction As DbTransaction, transactionId As Guid, logger As IDiagnosticsLogger(Of DbLoggerCategory.Database.Transaction), transactionOwned As Boolean) As RelationalTransaction
参数
- connection
- IRelationalConnection
与数据库的连接。
- transaction
- DbTransaction
基础 DbTransaction。
- transactionId
- Guid
此事务的唯一相关 ID。
要写入的记录器。
- transactionOwned
- Boolean
一个 值,该值指示事务是否由此类拥有 (即,当此类被释放) 时是否可以释放它。
返回
新 RelationalTransaction 实例。