Working on a command dispatcher
This commit is contained in:
parent
31666b4ba0
commit
a86a2d7ade
5 changed files with 55 additions and 4 deletions
|
|
@ -7,8 +7,8 @@ namespace PlanTempus.Components.Users.Create
|
|||
|
||||
public class CreateUserCommand : ICommand
|
||||
{
|
||||
public string Email { get; set; }
|
||||
public string Password { get; set; }
|
||||
public required string Email { get; set; }
|
||||
public required string Password { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public required Guid CorrelationId { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,12 @@ using PlanTempus.Core.Telemetry;
|
|||
|
||||
namespace PlanTempus.Components.Users.Create
|
||||
{
|
||||
public interface ICommandHandler<T, TResult>
|
||||
public interface ICommandHandler
|
||||
{
|
||||
Task<TCommandResult> Handle<TCommand, TCommandResult>(TCommand command );
|
||||
}
|
||||
|
||||
public interface ICommandHandler<in T, TResult>
|
||||
{
|
||||
Task<TResult> Handle(T input);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue