Adds Generic CommandHandlerDecorator

This commit is contained in:
Janus C. H. Knudsen 2025-03-12 00:13:53 +01:00
parent 49f9b99ee1
commit 64e696dc5a
21 changed files with 131 additions and 110 deletions

View file

@ -0,0 +1,7 @@
namespace PlanTempus.Core.CommandQueries;
public abstract class Command : ICommand
{
public required Guid CorrelationId { get; set; }
public Guid TransactionId { get; set; }
}

View file

@ -0,0 +1,16 @@
namespace PlanTempus.Core.CommandQueries;
public class CommandResponse
{
public Guid RequestId { get; }
public Guid CorrelationId { get; }
public Guid? TransactionId { get; }
public DateTime CreatedAt { get; }
public CommandResponse(Guid correlationId)
{
CorrelationId = correlationId;
RequestId = Guid.CreateVersion7();
CreatedAt = DateTime.Now;
}
}

View file

@ -0,0 +1,7 @@
namespace PlanTempus.Core.CommandQueries;
public interface ICommand
{
Guid CorrelationId { get; set; }
Guid TransactionId { get; set; }
}