Initial commit - ECommerce project
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// using System;
|
||||
// using System.Collections.Generic;
|
||||
// using System.Linq;
|
||||
// using System.Threading.Tasks;
|
||||
// using Contracts.DTOs;
|
||||
// using Contracts.DTOs.Generic;
|
||||
|
||||
// namespace Commerce.Core.Utility;
|
||||
// public static class PaginationExtension
|
||||
// {
|
||||
// public static IQueryable<T> Paginate<T>(this IQueryable<T> query, Pagination pagination)
|
||||
// {
|
||||
// if (pagination.CurrentPage.HasValue && pagination.PageSize.HasValue)
|
||||
// return query
|
||||
// .Skip((pagination.CurrentPage.Value - 1) * pagination.PageSize.Value)
|
||||
// .Take(pagination.PageSize.Value);
|
||||
// else
|
||||
// return query;
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user