private Db_LccRune CreateCachedRuneInformation(int runeId) { IEnumerable <Db_LccRune> runes = _runeStaticDataReposistory.GetAllRunes(); return(new Db_LccRune() { RuneId = runeId, RuneName = runes.FirstOrDefault(x => x.RuneId == runeId)?.RuneName, RunePathName = runes.FirstOrDefault(x => x.RuneId == runeId)?.RunePathName, Icon = runes.FirstOrDefault(x => x.RuneId == runeId)?.Icon, Key = runes.FirstOrDefault(x => x.RuneId == runeId)?.Key, ShortDesc = runes.FirstOrDefault(x => x.RuneId == runeId)?.ShortDesc, LongDesc = runes.FirstOrDefault(x => x.RuneId == runeId)?.LongDesc }); }
public JsonResult GetAllRunesData() { List <LccRuneInformation> runeInformationList = new List <LccRuneInformation>(); foreach (Db_LccRune dbRune in _runesStaticDataRepository.GetAllRunes().ToList()) { runeInformationList.Add(new LccRuneInformation() { RuneId = dbRune.RuneId, RuneName = dbRune.RuneName, RunePathName = dbRune.RunePathName, Key = dbRune.Key, ShortDesc = dbRune.ShortDesc, LongDesc = dbRune.LongDesc, Icon = dbRune.Icon }); } return(new JsonResult(runeInformationList)); }