コード例 #1
0
        public static string GetWord(string wordId, string lang)
        {
            Word word = WordGetter.GetWordFromDb(wordId);

            if (word != default(Word))
            {
                //send to the controller to be displayed
                return(Displayer <object>(word.Results));
            }
            else
            {
                string json = APIQueries.GetEntries(lang, wordId);
                word = ConvertJsonToObject(json);
                WordsBusiness.Add(word);
                // send to the controller to be displayed
                return(Displayer <IJoinCLasses>(word.Results));
            }
        }
コード例 #2
0
 public static void GetWordByEntries(string wordId, string language)
 {
     APIQueries.GetEntries(language, wordId);
 }