Resolve all high-severity architecture review findings
This commit is contained in:
@@ -58,6 +58,7 @@ internal sealed class AuditingDbCommand : DbCommand
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private DbConnection? _wrappingConnection;
|
||||
private DbTransaction? _wrappingTransaction;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new auditing database command decorator.
|
||||
@@ -171,8 +172,13 @@ internal sealed class AuditingDbCommand : DbCommand
|
||||
/// <inheritdoc />
|
||||
protected override DbTransaction? DbTransaction
|
||||
{
|
||||
get => _inner.Transaction;
|
||||
set => _inner.Transaction = value;
|
||||
get => _inner.Transaction is null ? null : _wrappingTransaction;
|
||||
set
|
||||
{
|
||||
// Preserve the public wrapper, while giving the provider its own transaction.
|
||||
_inner.Transaction = value is AuditingDbTransaction auditing ? auditing.Inner : value;
|
||||
_wrappingTransaction = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user