public IActionResult Edit(int Id) { //var Edit = _context.Employees.FirstOrDefault(x=>x.EmployeeId == Id); var Edit = _repo.Edit(Id); return(View("Index", Edit)); }
public override Employee Edit(long id, Employee model) { var entity = employeeRepo.Get(id); if (entity != null) { entity.Name = model.Name; return(employeeRepo.Edit(entity)); } return(model); }
public Employee UpdateEmployee(Employee entity) { return(EmployeeRepo.Edit(entity.EmployeeID, entity)); }