示例#1
0
 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());
     }
 }
示例#2
0
 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());
     }
 }