Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.InputEncoding  = Encoding.GetEncoding(1251);
            Console.OutputEncoding = Encoding.GetEncoding(1251);
            TradicDataAccess  access      = TradicDataAccess.GetInstance();
            WordHelper        wordHelper  = new WordHelper(access);
            TranslationHelper transHelper = new TranslationHelper(access);
            LanguageHelper    langHelper  = new LanguageHelper(access);

            //Interview(transHelper, wordHelper,langHelper);
            //langHelper.AddEntity(new Language { Name = "English" });

            GetRandomWords(wordHelper, langHelper);

            //TradicContext con = new TradicContext();

            //con.Set<Language>().Add(new Language { Name = "Russian" });
            //con.SaveChanges();

            //IEnumerable<Language> languages = con.Languages;
            //foreach (Language l in languages)
            //{
            //    Console.WriteLine(l.Id + ": " + l.Name);
            //}

            Console.ReadLine();
        }
Exemplo n.º 2
0
 public static ITradicIterator GetInstance()
 {
     if (CurrentInstance == null)
     {
         CurrentInstance = new TradicIterator();
         TradicDataAccess access = TradicDataAccess.GetInstance();
         transHelper       = new TranslationHelper(access);
         wordHelper        = new WordHelper(access);
         languageHelper    = new LanguageHelper(access);
         descriptionHelper = new DescriptionHelper(access);
     }
     return(CurrentInstance);
 }