Table of Contents

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

dbContext ApplicationDbContext

The current application database context.

auditRecord AuditRecord

The 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

dbContext ApplicationDbContext

The current application database context.

auditRecord AuditRecord

The audit record to append.

cancellationToken CancellationToken

A token that can cancel the append operation.

Returns

ValueTask

A task that completes when the audit record has been appended.