Ejemplo n.º 1
0
        public Result Handle(BetterPlaceBetOnMatch command)
        {
            bool betPlaced = _tournamentRepository.BetterPlacesMatchBetOnMatch(
                command.TournamentId,
                command.MatchId,
                command.BetterName,
                command.PlayerName);

            if (!betPlaced)
            {
                return(Result.Failure($"Better ({ command.BetterName }) could not place match bet on player ({ command.PlayerName }) in match ({ command.MatchId }) within tournament ({ command.TournamentId })"));
            }

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