using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; // Represents a paginated result set for a collection of items. public class PaginationResult { // Total number in the item List. public int totalCount { get; set; } // The current page index (starting from 0). public int pageIndex { get; set; } // The number of items displayed per page. public int countPerPage { get; set; } // The list of items for the current page. public List items { get; set; } // Constructor to initialize a new instance of the PaginationResult class. // 'totalCount' is the total number of items, 'pageIndex' is the current page, // 'countPerPage' is the number of items per page, and 'items' is the list of items for the current page. public PaginationResult(int totalCount, int pageIndex, int countPerPage, List items) { this.totalCount = totalCount; // Sets the total number of items available. this.pageIndex = pageIndex; // Sets the current page index (starting from 1). this.countPerPage = countPerPage; // Sets the number of items per page. this.items = items; // Sets the items for the current page. } }