public override async Task <HighlightsInfoList> getHighlightsInfoListByExbContractId(ExbContractIdRequest request, ServerCallContext context) { try { HighlightsInfoList highlightsInfoList = new HighlightsInfoList(); var list = await _service.GetHighlightsInfoListByExbContractId(request.ExbContractId); var result = Mapper.Map <List <HighlightsInfo>, List <HighlightsInfoStruct> >(list); highlightsInfoList.Listdata.AddRange(result); highlightsInfoList.Total = result.Count; return(highlightsInfoList); } catch (Exception ex) { LogHelper.Error(this, ex); throw ex; } }
public override async Task <HighlightsInfoList> getHighlightsInfoList(PaginationRequestSearch request, ServerCallContext context) { try { HighlightsInfoList highlightsInfoList = new HighlightsInfoList(); var search = Mapper.Map <SearchStruct, SearchModel>(request.Search); var list = await _service.GetHighlightsInfoList(request.Offset, request.Limit, search); var result = Mapper.Map <List <HighlightsInfo>, List <HighlightsInfoStruct> >(list); highlightsInfoList.Listdata.AddRange(result); highlightsInfoList.Total = await _service.GetHighlightsInfoListCount(search); return(highlightsInfoList); } catch (Exception ex) { LogHelper.Error(this, ex); throw ex; } }