public IActionResult Edit(Make make) { if (ModelState.IsValid) { _vroomAppDbContext.Update(make); _vroomAppDbContext.SaveChanges(); return(RedirectToAction(nameof(IndexMakeList))); } return(View()); }
public IActionResult EditModelPost() { if (!ModelState.IsValid) { return(View(modelViewModel)); } _vroomAppDbContext.Update(modelViewModel.Model); _vroomAppDbContext.SaveChanges(); return(RedirectToAction(nameof(IndexModel))); }