Exemplo n.º 1
0
        public void StartInitialization()
        {

            ViewModelLocator.Instance.InitializeDataBaseContext();
            DataBase = ViewModelLocator.Instance.DataBase;

            InitializeSpeechParts();
            //InitializeFrequencyDictionary();
            //LearningWordStrategy_Initialization();
        }
Exemplo n.º 2
0
        public void InitializeDataBaseContext()
        {

            DataBase = new EFDbContext();

            var res = DataBase.Database.SqlQuery<Guid>("select id from AppSettings").ToList();
            string NameOfAppDictionary = "Application dictionary";

            var dict = DataBase.Dictionary.SqlQuery("select * from [Dictionaries] where [name] = '"+NameOfAppDictionary+"'").FirstOrDefault();
            /*
            if (ApplicationDictionary == null)
            {
                ApplicationDictionary = new Dictionary();
                ApplicationDictionary.name = NameOfAppDictionary;
                DataBase.Dictionary.Add(ApplicationDictionary);
                DataBase.SaveChanges();
            }
            */

            DataBase.Language.Load();
            Languages = DataBase.Language.Local;
        }