Exemple #1
0
 private TournamentAggregate GetNewTournament()
 {
     return(TournamentAggregate.CreateNew(
                _tournamentId,
                _tournamentName,
                _tournamentDescription));
 }
        public async Task <string> Handle(CreateTournamentCommand request, CancellationToken cancellationToken)
        {
            var tournament = TournamentAggregate.CreateNew(await _tournamentRepository.NextIdAsync(), request.Name,
                                                           request.Description);
            await _tournamentRepository.SetAsync(tournament);

            return(tournament.Id.ToString());
        }