RelationalTransactionFactory.Create 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Create(IRelationalConnection, DbTransaction, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, Boolean)
创建一个 RelationalTransaction 实例。
public virtual 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
override this.Create : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> * bool -> Microsoft.EntityFrameworkCore.Storage.RelationalTransaction
Public Overridable 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 virtual 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
override this.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 Overridable 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 实例。