public async Task <IActionResult> Edit(Task task) { if (ModelState.IsValid) { _context.Update(task); await _context.SaveChangesAsync(); } return(RedirectToAction("Index", new { selectedTaskId = task.Id })); }
public virtual void Update(TEntity entityToUpdate) => _context.Update(entityToUpdate);