Пример #1
0
 //initialize the constructor of controller
 public ModelController(VroomAppDbContext vroomAppDbContext)
 {
     _vroomAppDbContext = vroomAppDbContext;
     //initialize modelViewModel with new ModelViewModel
     modelViewModel = new ModelViewModel()
     {
         //assign makes from databse
         Makes = _vroomAppDbContext.Makes.ToList(),
         //assign new model
         Model = new Models.Model()
     };
 }
Пример #2
0
 public MakeController(VroomAppDbContext vroomAppDbContext)
 {
     _vroomAppDbContext = vroomAppDbContext;
 }