public IActionResult Edit(int Id)
        {
            //var Edit = _context.Employees.FirstOrDefault(x=>x.EmployeeId == Id);
            var Edit = _repo.Edit(Id);

            return(View("Index", Edit));
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public Employee UpdateEmployee(Employee entity)
 {
     return(EmployeeRepo.Edit(entity.EmployeeID, entity));
 }