public async Task ExecuteAsync(ManyDependenciesCommand command) { if (string.IsNullOrWhiteSpace(command.Text)) { throw new ArgumentNullException(nameof(command.Text)); } if (_booleanService.DoSomething()) { Output = _stringService.PrintWithFormat(command.Text); } await _repository.AddAsync(Bar.Create(Guid.NewGuid())).ConfigureAwait(false); }
public Task ExecuteAsync(ManyDependenciesEvent @event) { if (string.IsNullOrWhiteSpace(@event.Text)) { throw new ArgumentNullException(nameof(@event.Text)); } if (_booleanService.DoSomething()) { Output = _stringService.PrintWithFormat(@event.Text); } _repository.Add(Bar.Create(Guid.NewGuid())); return(Task.CompletedTask); }
public Task <DefaultResponse> ExecuteAsync(ManyDependenciesCommand command) { if (string.IsNullOrWhiteSpace(command.Text)) { throw new ArgumentNullException(nameof(command.Text)); } if (_booleanService.DoSomething()) { Output = _stringService.PrintWithFormat(command.Text); } _repository.Add(Domain.Bar.Bar.Create(Guid.NewGuid())); return(Task.FromResult(new DefaultResponse(command.AggregateId))); }