private Db_LccChampion CreateCachedChampionInformation(int championId) { IEnumerable <Db_LccChampion> champions = _championStaticDataRepository.GetAllChampions(); return(new Db_LccChampion() { ChampionId = championId, ChampionName = champions.FirstOrDefault(x => x.ChampionId == championId)?.ChampionName, ImageFull = champions.FirstOrDefault(x => x.ChampionId == championId)?.ImageFull }); }
public JsonResult GetAllChampionsData() { List <LccChampionInformation> championInformationList = new List <LccChampionInformation>(); foreach (Db_LccChampion dbChampion in _championStaticDataRepository.GetAllChampions().ToList()) { championInformationList.Add(new LccChampionInformation() { ChampionId = dbChampion.ChampionId, ChampionName = dbChampion.ChampionName, ImageFull = dbChampion.ImageFull }); } return(new JsonResult(championInformationList)); }