Inheritance: System.Data.Linq.DataContext
示例#1
0
 public List<string> ListWords(String text)
 {
     List<string> result = null;           
     DictionaryDataContext connect = new DictionaryDataContext();
     result = (from cust in connect.Words
               where cust.code == text
               select cust.word1).ToList<string>();
     return result;
 }
示例#2
0
        public List <string> ListWords(String text)
        {
            List <string>         result  = null;
            DictionaryDataContext connect = new DictionaryDataContext();

            result = (from cust in connect.Words
                      where cust.code == text
                      select cust.word1).ToList <string>();
            return(result);
        }
示例#3
0
 public string word(String text)
 {
     DictionaryDataContext connect = new DictionaryDataContext();
     List<string> result = (from cust in connect.Words
                            where cust.code == text
                            select cust.word1).ToList<string>();
     
     if (result.Count > 0)
         return result[0];
     else
         return "";
 }
示例#4
0
        public string word(String text)
        {
            DictionaryDataContext connect = new DictionaryDataContext();
            List <string>         result  = (from cust in connect.Words
                                             where cust.code == text
                                             select cust.word1).ToList <string>();

            if (result.Count > 0)
            {
                return(result[0]);
            }
            else
            {
                return("");
            }
        }