private SmartSchedulerContext() { try { m_Context.Database.Exists(); } catch (Exception ex) { throw new Exception("No data base connection!!! Check connection string in app settings or check MS SQL process!"); } Administrators = new Administrators(m_Context); Auditories = new Auditories(m_Context); ScheduleItems = new ScheduleItems(m_Context); Schedules = new Schedules(m_Context); Students = new Students(m_Context); Subjects = new Subjects(m_Context); TeacherRanks = new TeacherRanks(m_Context); Teachers = new Teachers(m_Context); Users = new Users(m_Context); Groups = new Groups(m_Context); Administrators.AddAdministrator("Admin", "admin", "", "", "", 1980); }