Пример #1
0
        public void CreateIfNeeded()
        {
            if (newDb)
            {
                Database.EnsureCreated();
                //Database.ExecuteSqlCommand(Database.GenerateCreateScript());

                newDb = false;
            }
            if (Notebooks.Count() == 0)
            {
                Notebooks.Add(new Notebook {
                    Name = "Archive"
                });
                Notebooks.Add(new Notebook {
                    Name = "Deleted"
                });
                SaveChanges();
            }
        }