Exemplo n.º 1
0
        public RegionsController(Models.AuthenticationContext database)
        {
            _database = database;

            //prevent delition of all books from db
            if (_database.Regions.Count() == 0)
            {
                _database.Regions.Add(new Regions {
                    RegionName = "Default"
                });
                _database.SaveChanges();
            }
        }
Exemplo n.º 2
0
        public AgeCategoryController(Models.AuthenticationContext database)
        {
            _database = database;

            //prevent delition of all books from db
            if (_database.AgeCategories.Count() == 0)
            {
                _database.AgeCategories.Add(new AgeCategory {
                    AgeCate = "Default"
                });
                _database.SaveChanges();
            }
        }
Exemplo n.º 3
0
        public HelpLinesController(Models.AuthenticationContext database)
        {
            _database = database;

            //prevent delition of all Numbers from db
            if (_database.HelpLines.Count() == 0)
            {
                _database.HelpLines.Add(new HelpLines {
                    HelpName = "Default"
                });
                _database.SaveChanges();
            }
        }
Exemplo n.º 4
0
        public GenderController(Models.AuthenticationContext database)
        {
            _database = database;

            //prevent delition of all books from db
            if (_database.Genders.Count() == 0)
            {
                _database.Genders.Add(new Gender {
                    GenType = "Default"
                });
                _database.SaveChanges();
            }
        }
Exemplo n.º 5
0
        public AboutController(Models.AuthenticationContext database)
        {
            _database = database;

            //prevent delition of all books from db
            if (_database.Abouts.Count() == 0)
            {
                _database.Abouts.Add(new About {
                    AboutName = "Default"
                });
                _database.SaveChanges();
            }
        }
Exemplo n.º 6
0
 public SmokerStatusController(Models.AuthenticationContext database)
 {
     _database = database;
 }