public DepartmentController(UMSTestJSDbContext context)
 {
     this.context     = context;
     studentViewModel = new StudentViewModel()
     {
         Department  = new Department(),
         Departments = context.Departments.ToList()
     };
 }
Esempio n. 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(),
     };
 }