Example #1
0
        public static ApiResponse AsApiResponse(this IPagedList source)
        {
            var totalPage = GetTotalPageCount(source.TotalItemCount, source.PageSize);

            return(new ApiResponse()
            {
                data = source.Cast <object>(),
                hasMore = totalPage - source.CurrentPageIndex > 0
            });
        }