Table of Contents

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

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.

public 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.