public void Create(DTOEmployee dtoEmployee) { dtoEmployee.CreatedDate = DateTime.Now; dtoEmployee.IsDeleted = false; dtoEmployee.Id = Guid.NewGuid(); dtoEmployee.PersonId = _personService.Create(dtoEmployee.Person); dtoEmployee.Person = null; _repository.Add(_mapper.Map <DTOEmployee, Employee>(dtoEmployee)); }
public void Update(DTOEmployee dtoEmployee) { var employee = Get(dtoEmployee.PersonId); dtoEmployee.UpdateDate = DateTime.Now; var mergedEmployee = _mapper.Map(dtoEmployee, employee); _personService.Update(mergedEmployee.Person); _repository.Update(_mapper.Map <DTOEmployee, Employee>(mergedEmployee)); }
public IHttpActionResult Update(DTOEmployee dtoEmployee) { _employeeFacade.Update(dtoEmployee); return(Ok()); }
public void Update(DTOEmployee dtoEmployee) { EmployeeService.Update(dtoEmployee); }
public void Create(DTOEmployee dtoEmployee) { EmployeeService.Create(dtoEmployee); }