public IActionResult Edit(int id, Unit unit) { if (id != unit.UnitId) { return(NotFound()); } _context.Update(unit); _context.SaveChanges(); return(RedirectToAction(nameof(Index))); }
public IActionResult Edit(int id, Employee employee) { if (id != employee.EmployeeId) { return(NotFound()); } _context.Update(employee); _context.SaveChanges(); return(RedirectToAction(nameof(Index))); }