Ejemplo n.º 1
0
        public IActionResult Create([FromRoute] long gameTeamId, [FromQuery] long gameId, [FromQuery] int?wagerType)
        {
            GameTeam  gameTeam  = _gameTeamRepository.GetById(gameTeamId);
            Team      team      = _teamRepository.GetTeamById(gameTeam.TeamId);
            GameSlate gameSlate = _gameSlateRepository.GetByGameId(gameId);

            CreateWager createWager = new CreateWager {
                AwayTeamFullName = gameSlate.AwayTeamFullName,
                HomeTeamFullName = gameSlate.HomeTeamFullName,
                WagerGameTeamSpreadMoneylineOfBet = $"{(gameTeam.SpreadMoneylineCurrent > 0 ? "+" : string.Empty)}{gameTeam.SpreadMoneylineCurrent}",
                WagerGameTeamTeamName             = team.FullName,
                WagerGameTeamSpreadOfBet          = $"{(gameTeam.SpreadCurrent > 0 ? "+" : string.Empty)}{gameTeam.SpreadCurrent}",
                WagerType  = wagerType,
                GameTeamId = gameTeamId,
                GameId     = gameId
            };

            return(View(createWager));
        }