Пример #1
0
        public static SortedSet <AlphabetLetter> GetAlphabetByLangId(int langId)
        {
            var alphabets = CacheProvider.Provider.GetOrSetForever("alphabets", () => Languages.PopulateAlphabets());

            if (alphabets.Any(a => a.LangId == langId))
            {
                return(alphabets.Where(a => a.LangId == langId).FirstOrDefault().Letters);
            }
            else
            {
                return(alphabets.FirstOrDefault().Letters);
            }
        }
Пример #2
0
 public static void RePopulateAlphabetsToCache()
 {
     CacheProvider.Provider.DeleteCacheItem("alphabets");
     CacheProvider.Provider.GetOrSetForever("alphabets", () => Languages.PopulateAlphabets());
 }