Interface IApplicationAuditStore
- Namespace
- ProjectTemplate.Infrastructure.Data.Auditing
- Assembly
- ProjectTemplate.Infrastructure.dll
Defines the template-owned storage seam for application audit records.
public interface IApplicationAuditStore
Remarks
The default implementation stores audit records locally through ApplicationDbContext. Consuming applications may replace this contract with an outbox writer, external sink, or companion governance/audit adapter.
Methods
Append(ApplicationDbContext, AuditRecord)
Appends an audit record during the synchronous save pipeline.
void Append(ApplicationDbContext dbContext, AuditRecord auditRecord)
Parameters
dbContextApplicationDbContextThe current application database context.
auditRecordAuditRecordThe audit record to append.
AppendAsync(ApplicationDbContext, AuditRecord, CancellationToken)
Appends an audit record during the asynchronous save pipeline.
ValueTask AppendAsync(ApplicationDbContext dbContext, AuditRecord auditRecord, CancellationToken cancellationToken = default)
Parameters
dbContextApplicationDbContextThe current application database context.
auditRecordAuditRecordThe audit record to append.
cancellationTokenCancellationTokenA token that can cancel the append operation.
Returns
- ValueTask
A task that completes when the audit record has been appended.