예제 #1
0
 public DepartmentController(UMSTestJSDbContext context)
 {
     this.context     = context;
     studentViewModel = new StudentViewModel()
     {
         Department  = new Department(),
         Departments = context.Departments.ToList()
     };
 }
예제 #2
0
 public StudentController(UMSTestJSDbContext context, IConfiguration configuration)
 {
     this.configuration = configuration;
     this.context       = context;
     studentViewModel   = new StudentViewModel()
     {
         Student     = new Student(),
         Department  = new Department(),
         Students    = context.Students.ToList(),
         Departments = context.Departments.ToList(),
     };
 }