|
@@ -163,10 +163,11 @@ namespace MTWorkHR.Application.Services
|
|
|
|
|
|
public override async Task<CompanyDto> Update(CompanyDto input)
|
|
|
{
|
|
|
- var companyUser = MapperObject.Mapper.Map<UserUpdateDto>(input.CompanyUser);
|
|
|
+ //var companyUser = MapperObject.Mapper.Map<UserUpdateDto>(input.CompanyUser);
|
|
|
_unitOfWork.BeginTran();
|
|
|
|
|
|
- await UpdateCompanyUser(input);
|
|
|
+ var returnedUser = await UpdateCompanyUser(input);
|
|
|
+ //var entity = await GetById(input.Id);
|
|
|
var entity = await _unitOfWork.Company.GetByIdAsync(input.Id);
|
|
|
|
|
|
if (entity == null)
|
|
@@ -249,7 +250,7 @@ namespace MTWorkHR.Application.Services
|
|
|
{
|
|
|
throw e;
|
|
|
}
|
|
|
- var userResponse = await GetById(input.Id);
|
|
|
+ var userResponse = await _userService.GetById(input.CompanyUser.Id);
|
|
|
var user = MapperObject.Mapper.Map<UserUpdateDto>(userResponse);
|
|
|
return user;
|
|
|
}
|