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

            newEmployee.Id = _EmployeeData.Add(newEmployee.MapEmployee());

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