TransactionErrorEventData 构造函数

定义

重载

TransactionErrorEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbTransaction, Guid, Guid, String, Exception, DateTimeOffset, TimeSpan)

构造事件有效负载。

TransactionErrorEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbTransaction, DbContext, Guid, Guid, Boolean, String, Exception, DateTimeOffset, TimeSpan)

构造事件有效负载。

TransactionErrorEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbTransaction, Guid, Guid, String, Exception, DateTimeOffset, TimeSpan)

Source:
TransactionErrorEventData.cs
Source:
TransactionErrorEventData.cs

构造事件有效负载。

public TransactionErrorEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbTransaction transaction, Guid transactionId, Guid connectionId, string action, Exception exception, DateTimeOffset startTime, TimeSpan duration);
new Microsoft.EntityFrameworkCore.Diagnostics.TransactionErrorEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbTransaction * Guid * Guid * string * Exception * DateTimeOffset * TimeSpan -> Microsoft.EntityFrameworkCore.Diagnostics.TransactionErrorEventData
Public Sub New (eventDefinition As EventDefinitionBase, messageGenerator As Func(Of EventDefinitionBase, EventData, String), transaction As DbTransaction, transactionId As Guid, connectionId As Guid, action As String, exception As Exception, startTime As DateTimeOffset, duration As TimeSpan)

参数

eventDefinition
EventDefinitionBase

事件定义。

messageGenerator
Func<EventDefinitionBase,EventData,String>

生成此事件的日志消息的委托。

transaction
DbTransaction

DbTransaction

transactionId
Guid

一个关联 ID,用于标识正在使用的实体框架事务。

connectionId
Guid

一个关联 ID,用于标识正在使用的 DbConnection 实例。

action
String

“提交”或“回滚”之一。

exception
Exception

事务失败时引发的异常。

startTime
DateTimeOffset

此事件的开始时间。

duration
TimeSpan

此事件的持续时间。

适用于

TransactionErrorEventData(EventDefinitionBase, Func<EventDefinitionBase, EventData,String>, DbTransaction, DbContext, Guid, Guid, Boolean, String, Exception, DateTimeOffset, TimeSpan)

Source:
TransactionErrorEventData.cs
Source:
TransactionErrorEventData.cs
Source:
TransactionErrorEventData.cs
Source:
TransactionErrorEventData.cs
Source:
TransactionErrorEventData.cs
Source:
TransactionErrorEventData.cs
Source:
TransactionErrorEventData.cs

构造事件有效负载。

public TransactionErrorEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbTransaction transaction, Microsoft.EntityFrameworkCore.DbContext context, Guid transactionId, Guid connectionId, bool async, string action, Exception exception, DateTimeOffset startTime, TimeSpan duration);
public TransactionErrorEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbTransaction transaction, Microsoft.EntityFrameworkCore.DbContext? context, Guid transactionId, Guid connectionId, bool async, string action, Exception exception, DateTimeOffset startTime, TimeSpan duration);
new Microsoft.EntityFrameworkCore.Diagnostics.TransactionErrorEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbTransaction * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * bool * string * Exception * DateTimeOffset * TimeSpan -> Microsoft.EntityFrameworkCore.Diagnostics.TransactionErrorEventData
Public Sub New (eventDefinition As EventDefinitionBase, messageGenerator As Func(Of EventDefinitionBase, EventData, String), transaction As DbTransaction, context As DbContext, transactionId As Guid, connectionId As Guid, async As Boolean, action As String, exception As Exception, startTime As DateTimeOffset, duration As TimeSpan)

参数

eventDefinition
EventDefinitionBase

事件定义。

messageGenerator
Func<EventDefinitionBase,EventData,String>

生成此事件的日志消息的委托。

transaction
DbTransaction

DbTransaction

context
DbContext

当前 DbContext 正在使用的 ;如果未知, null 则为 。

transactionId
Guid

一个关联 ID,用于标识正在使用的实体框架事务。

connectionId
Guid

一个关联 ID,用于标识正在使用的 DbConnection 实例。

async
Boolean

指示是否异步使用事务。

action
String

“提交”或“回滚”之一。

exception
Exception

事务失败时引发的异常。

startTime
DateTimeOffset

此事件的开始时间。

duration
TimeSpan

此事件的持续时间。

适用于