Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Remove unused method (PagedList)
KrzysztofPajakc2734fd76a7e
diff --git a/src/Core/Grand.Domain/Data/PagedList.cs b/src/Core/Grand.Domain/Data/PagedList.csindex db7c6b470..14117a1ae 100644--- a/src/Core/Grand.Domain/Data/PagedList.cs+++ b/src/Core/Grand.Domain/Data/PagedList.cs@@ -31,50 +31,6 @@ namespace Grand.DomainPageIndex = pageIndex;}- private async Task InitializeAsync(IMongoCollection<T> source, FilterDefinition<T> filterdefinition, SortDefinition<T> sortdefinition, int pageIndex, int pageSize, FindOptions findOptions = null)- {- TotalCount = (int)await source.CountDocumentsAsync(filterdefinition);-- AddRange(await source.Find(filterdefinition, findOptions).Sort(sortdefinition).Skip(pageIndex * pageSize).Limit(pageSize).ToListAsync());- if (pageSize > 0)- {- TotalPages = TotalCount / pageSize;- if (TotalCount % pageSize > 0)- TotalPages++;- }- PageSize = pageSize;- PageIndex = pageIndex;- }-- private async Task InitializeAsync(IAggregateFluent<T> source, int pageIndex, int pageSize)- {- var range = source.Skip(pageIndex * pageSize).Limit(pageSize + 1).ToList();- int total = range.Count > pageSize ? range.Count : pageSize;- TotalCount = (await source.ToListAsync()).Count;- if (pageSize > 0)- TotalPages = total / pageSize;-- if (total % pageSize > 0)- TotalPages++;-- PageSize = pageSize;- PageIndex = pageIndex;- AddRange(range.Take(pageSize));- }-- public static async Task<PagedList<T>> Create(IMongoCollection<T> source, FilterDefinition<T> filterdefinition, SortDefinition<T> sortdefinition, int pageIndex, int pageSize, FindOptions findOptions = null)- {- var pagelist = new PagedList<T>();- await pagelist.InitializeAsync(source, filterdefinition, sortdefinition, pageIndex, pageSize, findOptions);- return pagelist;- }- public static async Task<PagedList<T>> Create(IQueryable<T> source, FilterDefinition<T> filterdefinition, SortDefinition<T> sortdefinition, int pageIndex, int pageSize, FindOptions findOptions = null)- {- var pagelist = new PagedList<T>();- await pagelist.InitializeAsync((IMongoCollection<T>)source, filterdefinition, sortdefinition, pageIndex, pageSize, findOptions);- return pagelist;- }-public static async Task<PagedList<T>> Create(IQueryable<T> source, int pageIndex, int pageSize, FindOptions findOptions = null){var pagelist = new PagedList<T>();@@ -82,17 +38,6 @@ namespace Grand.Domainreturn pagelist;}- public static async Task<PagedList<T>> Create(IMongoQueryable<T> source, int pageIndex, int pageSize)- {- var pagelist = new PagedList<T>();- await pagelist.InitializeAsync(source, pageIndex, pageSize);- return pagelist;- }- public static async Task<PagedList<T>> Create(IAggregateFluent<T> source, int pageIndex, int pageSize)- {- var pagelist = new PagedList<T>();- await pagelist.InitializeAsync(source, pageIndex, pageSize);- return pagelist;- }+}}