Skip to main content
Table of Contents

Interface ICommandAuditRepository

Namespace
Stratara.Abstractions.EventSourcing
Assembly
Stratara.Abstractions.dll

Persists every dispatched command for audit purposes. The CommandAuditBehavior pipeline-behavior invokes this; the returned id is propagated to subsequent event appends as the CausationId.

public interface ICommandAuditRepository
Extension Methods

Methods

AddAsync(ICommandBase, CancellationToken)

Persist command as an audit row.

Task<Guid> AddAsync(ICommandBase command, CancellationToken cancellationToken)

Parameters

command ICommandBase

The command being dispatched.

cancellationToken CancellationToken

Propagated to the write-store transaction.

Returns

Task<Guid>

The id assigned to the audit row. Used as CausationId downstream.