mirror of
https://github.com/Biarity/Sieve.git
synced 2024-11-21 21:12:50 +01:00
Merge pull request #63 from janverley/master
Only Skip when pageSize > 0
This commit is contained in:
commit
0637912098
@ -337,10 +337,9 @@ namespace Sieve.Services
|
||||
var pageSize = model?.PageSize ?? _options.Value.DefaultPageSize;
|
||||
var maxPageSize = _options.Value.MaxPageSize > 0 ? _options.Value.MaxPageSize : pageSize;
|
||||
|
||||
result = result.Skip((page - 1) * pageSize);
|
||||
|
||||
if (pageSize > 0)
|
||||
{
|
||||
result = result.Skip((page - 1) * pageSize);
|
||||
result = result.Take(Math.Min(pageSize, maxPageSize));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user