Class LocalApplicationAuditStore
- Namespace
- ProjectTemplate.Infrastructure.Data.Auditing
- Assembly
- ProjectTemplate.Infrastructure.dll
Stores application audit records in the local EF Core audit record table.
public sealed class LocalApplicationAuditStore : IApplicationAuditStore
- Inheritance
-
LocalApplicationAuditStore
- Implements
- Inherited Members
Methods
Append(ApplicationDbContext, AuditRecord)
Appends an audit record during the synchronous save pipeline.
public 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.
public 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.