public async Task <IActionResult> CreateCoach([FromBody] RegisterReqest reqest)
        {
            var comand = new CreateCoachCommand(
                login: reqest.Login,
                password: reqest.Password,
                firstName: reqest.FirstName,
                lastName: reqest.LastName,
                email: reqest.Email,
                preSharedKey: reqest.PreSharedKey
                );

            await commandSender.SendAsync(comand);

            return(Ok());
        }
示例#2
0
 public async Task SendAsync <TCommand>(TCommand command) where TCommand : ICommand
 {
     await _commandSenderAsync.SendAsync(command);
 }
示例#3
0
 public void SendAsyncThrowsExceptionWhenCommandIsNull()
 {
     _createSomething = null;
     Assert.ThrowsAsync <ArgumentNullException>(async() => await _sut.SendAsync(_createSomething));
 }
示例#4
0
 /// <inheritdoc />
 public Task SendAsync <TCommand>(TCommand command) where TCommand : ICommand
 {
     return(_commandSenderAsync.SendAsync(command));
 }