Example #1
0
        public async Task <Bet> GetActiveBetById(int id)
        {
            var bet = await _betRepository.GetBetById(id);

            if (bet == null)
            {
                return(null);
            }

            return(bet.HasEnded
                ? null
                : bet);
        }
Example #2
0
 public Bet GetBetById(int betId)
 {
     return(_repos.GetBetById(betId));
 }