Example #1
0
        public Result Handle(CreateTournament command)
        {
            Tournament tournament = _tournamentRepository.CreateTournament(command.Name);

            if (tournament == null)
            {
                return(Result.Failure($"Could not create tournament ({command.Name})"));
            }

            _tournamentRepository.Save();
            return(Result.Success());
        }