Example #1
0
        public async Task <List <Champion> > GetAllChampion()
        {
            var listChampion = _cacheService.GetCache <List <Champion> >(KeyListChampion);

            if (listChampion == null)
            {
                listChampion = await _firebaseService.GetChampions();

                listChampion = listChampion.OrderBy(a => a.Name).ToList();

                _cacheService.SetCache(KeyListChampion, listChampion);
            }

            return(listChampion);
        }