//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() }; }
public MakeController(VroomAppDbContext vroomAppDbContext) { _vroomAppDbContext = vroomAppDbContext; }