Make ApplyFiltering, ApplySorting and ApplyPagination protected virtual #139 (#144)

This commit is contained in:
ITDancer13 2021-05-17 07:58:42 +02:00 committed by GitHub
parent ec6c310bf1
commit 7542ec0fbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,7 @@ namespace Sieve.Services
}
}
private IQueryable<TEntity> ApplyFiltering<TEntity>(TSieveModel model, IQueryable<TEntity> result,
protected virtual IQueryable<TEntity> ApplyFiltering<TEntity>(TSieveModel model, IQueryable<TEntity> result,
object[] dataForCustomMethods = null)
{
if (model?.GetFiltersParsed() == null)
@ -343,7 +343,7 @@ namespace Sieve.Services
return Expression.Convert(hoistedConstant.Body, targetType);
}
private IQueryable<TEntity> ApplySorting<TEntity>(TSieveModel model, IQueryable<TEntity> result,
protected virtual IQueryable<TEntity> ApplySorting<TEntity>(TSieveModel model, IQueryable<TEntity> result,
object[] dataForCustomMethods = null)
{
if (model?.GetSortsParsed() == null)
@ -372,7 +372,7 @@ namespace Sieve.Services
return result;
}
private IQueryable<TEntity> ApplyPagination<TEntity>(TSieveModel model, IQueryable<TEntity> result)
protected virtual IQueryable<TEntity> ApplyPagination<TEntity>(TSieveModel model, IQueryable<TEntity> result)
{
var page = model?.Page ?? 1;
var pageSize = model?.PageSize ?? Options.Value.DefaultPageSize;