public IActionResult New(DepartmentViewModel model) { if (!ModelState.IsValid) { return(View(model)); } var department = model.ToDepartment(); _employeeService.AddDepartment(department); return(RedirectToAction("Index")); }
public IActionResult New(DepartmentViewModel model) { if (!ModelState.IsValid) { return(View(model)); } var department = model.ToDepartment(); _employeeService.AddDepartment(department); return(RedirectToAction("Index")); }