namespace Svrnty.CQRS.Events.Abstractions.Models; /// /// Wraps a command result with the correlation ID assigned by the framework. /// Use this when you need to return the correlation ID to the caller (e.g., for multi-step workflows). /// /// The type of the command result. public sealed record CommandResultWithCorrelation { /// /// The result of the command execution. /// public required TResult Result { get; init; } /// /// The correlation ID assigned by the framework to all events emitted by this command. /// Use this to link follow-up commands to the same workflow/saga. /// public required string CorrelationId { get; init; } }