Esempio n. 1
0
        public async Task <object> Get(int userId, int pageIndex, int pageSize)
        {
            MessageBase2 result = new MessageBase2();
            var          v      = await _voucherService.FindListAsync(pageIndex, pageSize, userId);

            var page = ConvertHelper.ChangeType <MessagePageBase2>(v.pageDto);

            List <VoucherListResultModel> modelList = new List <VoucherListResultModel>();

            v.dto.ForEach(t => { modelList.Add(ConvertHelper.ChangeType <VoucherListResultModel>(t)); });

            page.Data = modelList;

            result.Data = page;
            return(result);
        }