public async Task <T> Update(T entity) { context.Update(entity); await SaveChangesAsync(); return(entity); }
public IActionResult Edit(Make make) { if (ModelState.IsValid) { _dataContext.Update(make); _dataContext.SaveChanges(); return(RedirectToAction("Index")); } return(View(make)); }
public IActionResult EditPost() { if (!ModelState.IsValid) { return(View(ModelVM)); } _dataContext.Update(ModelVM.Model); _dataContext.SaveChanges(); return(RedirectToAction("Index")); }
public void Save(T entity) { _dataContext.Update(entity); }