Exemplo n.º 1
0
        public IActionResult ModifyEmployee(EmployeeView employee)
        {
            if (!ModelState.IsValid)
            {
                return(View(employee));
            }

            if (!_EmployeeData.Update(employee.Id, employee.MapEmployee()))
            {
                return(View(employee));
            }

            return(RedirectToAction("GetEmployeeDetails", new { employee.Id }));
        }