public UserInfoHistoryDto Resolve(History source, HistoryDto destination, UserInfoHistoryDto destMember, ResolutionContext context) { try { return(_mapper.Map <UserInfoHistoryDto>(_userManager.FindByIdAsync(source.CreatorId.ToString()) .GetAwaiter().GetResult())); } catch { return(new UserInfoHistoryDto()); } }
public BonusDto Resolve(History source, HistoryDto destination, BonusDto destMember, ResolutionContext context) { try { return(_mapper.Map <BonusDto>(_bonusService.FindBonusByIdAsync(source.BonusId).GetAwaiter() .GetResult())); } catch { //Vendor does not finded by Id return(new BonusDto()); } }