コード例 #1
0
        public int SearchedWordID(string word)                  //either gets or adds searched word ID
        {
            var wordID = _anagramCache.GetSearchedWordID(word); // gets searched word ID

            if (wordID == 0)                                    // if not returned, add word and ID to table
            {
                var searchedWords = new SearchedWords()
                {
                    SearchedWord = word
                };
                wordID = _anagramCache.AddSearchedWordID(searchedWords);
            }
            return(wordID);
        }