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()); }
public async Task SendAsync <TCommand>(TCommand command) where TCommand : ICommand { await _commandSenderAsync.SendAsync(command); }
public void SendAsyncThrowsExceptionWhenCommandIsNull() { _createSomething = null; Assert.ThrowsAsync <ArgumentNullException>(async() => await _sut.SendAsync(_createSomething)); }
/// <inheritdoc /> public Task SendAsync <TCommand>(TCommand command) where TCommand : ICommand { return(_commandSenderAsync.SendAsync(command)); }