public async Task <ActionResult> AddSquadAsync( CreateSquadCommand createSquadCommand, CancellationToken cancellationToken) { await _squadHandler.CreateSquadAsync(createSquadCommand, cancellationToken); return(Ok()); }
public async Task CreateSquadAsync( CreateSquadCommand createSquadCommand, CancellationToken cancellationToken) { var squad = SquadFactory.Create(createSquadCommand.SquadOwnerId, createSquadCommand.Name); await _squadRepository.CreateAsync(squad, cancellationToken); await _squadRepository.SaveAsync(cancellationToken); }