public static void WriteTransactionRollbackError(this DiagnosticListener @this, Guid operationId, IsolationLevel isolationLevel, SqlConnection connection, string transactionName, Exception ex, [CallerMemberName] string operation = "")
{
if (@this.IsEnabled(SqlErrorRollbackTransaction))
{
@this.Write(
SqlErrorRollbackTransaction,
new
{
OperationId = operationId,
Operation = operation,
IsolationLevel = isolationLevel,
Connection = connection,
TransactionName = transactionName,
Exception = ex,
Timestamp = Stopwatch.GetTimestamp()
});
}
}
}