Пример #1
0
        public IActionResult Add(EmployeeView employee)
        {
            employee.SelectCompanies = companyDomainService.GetAll();
            if (ModelState.IsValid)
            {
                employeeDomainService.Add(Mapper.EmployeeViewToEmployee(employee));
                return(RedirectToAction("Index"));
            }

            return(View("Edit", employee));
        }
 public void Add(EmployeeDto dto)
 {
     _employeeDomainService.Add(MapFromDtoToEntity(dto, DtoToDomainEnum.Employee));
     _employeeDomainService.SaveChange();
 }