public async Task <ClosedRoulette> Closed(int id) { Random random = new Random(); int _randomNumber = random.Next(0 - 37); string _color = string.Empty; _color = _randomNumber % 2 == 0 ? "Rojo" : "Negro"; var result = await _rouletteService.Closed(id, _randomNumber, _color); _cacheService.ClearKeysByPattern(REDIS_CACHE_LIST_KEY); _cacheService.ClearKeysByPattern(string.Format(REDIS_CACHE_LIST_BET_KEY, id)); ClosedRoulette closedRoulette = new ClosedRoulette(); closedRoulette.IdRoulette = id; closedRoulette.State = "Colsed"; closedRoulette.NumberWinner = _randomNumber; closedRoulette.ColorWinner = _color; closedRoulette.ListBet = new List <Bet>(); closedRoulette.ListBet = this.ListBet(id).Result; return(closedRoulette); }