/// <inheritdoc/> public async Task <EmployeeItem> CreateEmployeeAsync(UpdateEmployeeRequest createRequest) { var dbEmployee = Mapper.Map <UpdateEmployeeRequest, Employee>(createRequest); await _repository.CreateAsync(dbEmployee); return(Mapper.Map <EmployeeItem>(dbEmployee)); }
/// <inheritdoc/> public async Task <EmployeeItem> UpdateEmployeeAsync(int employeeId, UpdateEmployeeRequest updateRequest) { var dbEmployee = await _repository.UpdateAsync(employeeId, Mapper.Map <Employee>(updateRequest)); return(Mapper.Map <EmployeeItem>(dbEmployee)); }