コード例 #1
0
ファイル: RenameTournament.cs プロジェクト: Gherks/slask
        public Result Handle(RenameTournament command)
        {
            bool renameSuccessful = _tournamentRepository.RenameTournament(command.TournamentId, command.TournamentName);

            if (!renameSuccessful)
            {
                return(Result.Failure($"Could not rename tournament ({ command.TournamentId }) to \"({ command.TournamentName })\""));
            }

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