public IActionResult GiftCardList(DataSourceRequest command, GiftCardListModel model) { var giftCards = _giftCardViewModelService.PrepareGiftCardModel(model, command.Page, command.PageSize); var gridModel = new DataSourceResult { Data = giftCards.giftCardModels.ToList(), Total = giftCards.totalCount }; return(Json(gridModel)); }
public async Task <IActionResult> GiftCardList(DataSourceRequest command, GiftCardListModel model) { var(giftCardModels, totalCount) = await _giftCardViewModelService.PrepareGiftCardModel(model, command.Page, command.PageSize); var gridModel = new DataSourceResult { Data = giftCardModels.ToList(), Total = totalCount }; return(Json(gridModel)); }