public async Task <TransactionReportResult> GetPaginatedAsync( int currentPage, int pageSize, DateTime from, DateTime to) { var(skip, take) = PagingUtils.GetNextPageParameters(currentPage, pageSize); var reports = await _transactionReportRepository.GetPaginatedAsync(skip, take, from, to); return(new TransactionReportResult { CurrentPage = currentPage, PageSize = pageSize, TotalCount = reports.Count, TransactionReports = reports }); }
public async Task <TransactionReportResult> GetPaginatedAsync( int currentPage, int pageSize, DateTime from, DateTime to, string[] partnerIds, Guid?campaignId, string transactionType = null, string status = null) { var(skip, take) = PagingUtils.GetNextPageParameters(currentPage, pageSize); var reports = await _transactionReportRepository.GetPaginatedAsync(skip, take, from, to, partnerIds, transactionType, status, campaignId); return(new TransactionReportResult { CurrentPage = currentPage, PageSize = pageSize, TotalCount = reports.Count, TransactionReports = reports }); }