Пример #1
0
        public bool OpenRoulette(Int64 id)
        {
            try
            {
                var sRoulettes = _rouletteRepository.GetKeysRedis("Roulettes");
                if (sRoulettes == null)
                {
                    return(false);
                }
                var objRoulettes = JsonConvert.DeserializeObject <List <RouletteEnt> >(sRoulettes);
                objRoulettes.Where(x => x.Id == id).ToList().ForEach(s => s.IsOpen = true);
                var response = _rouletteRepository.SetKeysRedis("Roulettes", JsonConvert.SerializeObject(objRoulettes));

                return(true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.StackTrace);
                return(false);
            }
        }