Beispiel #1
0
        public IActionResult New(DepartmentViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var department = model.ToDepartment();

            _employeeService.AddDepartment(department);


            return(RedirectToAction("Index"));
        }