RelationalTransaction 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
RelationalTransaction(IRelationalConnection, DbTransaction, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, Boolean)
初始化 RelationalTransaction 类的新实例。
public RelationalTransaction (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbTransaction transaction, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> logger, bool transactionOwned);
new Microsoft.EntityFrameworkCore.Storage.RelationalTransaction : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> * bool -> Microsoft.EntityFrameworkCore.Storage.RelationalTransaction
Public Sub New (connection As IRelationalConnection, transaction As DbTransaction, logger As IDiagnosticsLogger(Of DbLoggerCategory.Database.Transaction), transactionOwned As Boolean)
参数
- connection
- IRelationalConnection
与数据库的连接。
- transaction
- DbTransaction
基础 DbTransaction。
要写入的记录器。
- transactionOwned
- Boolean
一个值,该值指示事务是否由此类拥有 (即,在) 释放此类时是否可以释放该事务。
适用于
RelationalTransaction(IRelationalConnection, DbTransaction, ILogger, Boolean)
初始化 RelationalTransaction 类的新实例。
public RelationalTransaction (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbTransaction transaction, Microsoft.Extensions.Logging.ILogger logger, bool transactionOwned);
new Microsoft.EntityFrameworkCore.Storage.RelationalTransaction : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbTransaction * Microsoft.Extensions.Logging.ILogger * bool -> Microsoft.EntityFrameworkCore.Storage.RelationalTransaction
Public Sub New (connection As IRelationalConnection, transaction As DbTransaction, logger As ILogger, transactionOwned As Boolean)
参数
- connection
- IRelationalConnection
与数据库的连接。
- transaction
- DbTransaction
基础 DbTransaction。
- logger
- ILogger
要写入的记录器。
- transactionOwned
- Boolean
一个值,该值指示事务是否由此类拥有 (即,在) 释放此类时是否可以释放该事务。
适用于
RelationalTransaction(IRelationalConnection, DbTransaction, Guid, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, Boolean)
初始化 RelationalTransaction 类的新实例。
public RelationalTransaction (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbTransaction transaction, Guid transactionId, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> logger, bool transactionOwned);
new Microsoft.EntityFrameworkCore.Storage.RelationalTransaction : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbTransaction * Guid * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> * bool -> Microsoft.EntityFrameworkCore.Storage.RelationalTransaction
Public Sub New (connection As IRelationalConnection, transaction As DbTransaction, transactionId As Guid, logger As IDiagnosticsLogger(Of DbLoggerCategory.Database.Transaction), transactionOwned As Boolean)
参数
- connection
- IRelationalConnection
与数据库的连接。
- transaction
- DbTransaction
基础 DbTransaction。
- transactionId
- Guid
事务的相关 ID。
要写入的记录器。
- transactionOwned
- Boolean
一个值,该值指示事务是否由此类拥有 (即,在) 释放此类时是否可以释放该事务。
适用于
RelationalTransaction(IRelationalConnection, DbTransaction, Guid, IDiagnosticsLogger<DbLoggerCategory.Database.Transaction>, Boolean, ISqlGenerationHelper)
初始化 RelationalTransaction 类的新实例。
public RelationalTransaction (Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbTransaction transaction, Guid transactionId, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> logger, bool transactionOwned, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper);
new Microsoft.EntityFrameworkCore.Storage.RelationalTransaction : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbTransaction * Guid * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Transaction> * bool * Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper -> Microsoft.EntityFrameworkCore.Storage.RelationalTransaction
Public Sub New (connection As IRelationalConnection, transaction As DbTransaction, transactionId As Guid, logger As IDiagnosticsLogger(Of DbLoggerCategory.Database.Transaction), transactionOwned As Boolean, sqlGenerationHelper As ISqlGenerationHelper)
参数
- connection
- IRelationalConnection
与数据库的连接。
- transaction
- DbTransaction
基础 DbTransaction。
- transactionId
- Guid
事务的相关 ID。
要写入的记录器。
- transactionOwned
- Boolean
一个值,该值指示事务是否由此类拥有 (即,在) 释放此类时是否可以释放该事务。
- sqlGenerationHelper
- ISqlGenerationHelper
要使用的 SQL 生成帮助程序。