示例#1
0
        public void oneTimeSetUp()
        {
            var connection = DbConnectionFactory.CreateTransient();

            this.ctx  = new ApplicationDbContext(connection);
            this.serv = new SchoolClassService(new SchoolClassRepository(ctx),
                                               new StudentRepository(ctx),
                                               new TeacherRepository(ctx));
            new DatabaseSeeder().CreateDependenciesAndSeed(ctx);//heavy duty
        }
 public TeacherProfileController()
 {
     _teacherService     = new TeacherService();
     _schoolClassService = new SchoolClassService();
     _markService        = new MarkService();
 }