public async Task<IActionResult> History(DataSourceRequest command, string customerActionId) { var history = await _customerActionService.GetAllCustomerActionHistory(customerActionId, pageIndex: command.Page - 1, pageSize: command.PageSize); var items = new List<SerializeCustomerActionHistory>(); foreach (var item in history) { items.Add(await _customerActionViewModelService.PrepareHistoryModelForList(item)); } var gridModel = new DataSourceResult { Data = items, Total = history.TotalCount }; return Json(gridModel); }