-
Notifications
You must be signed in to change notification settings - Fork 45
Description
I think there may be a problem with the Paginated-related code.
I incorporated your repository (EntityRepository) into a project of mine. Whilst running a few scenarios, I found that if I made a call to the overload of Paginate, which takes PageIndex and PageSize as parameters, and passed in a PageIndex of 0 (e.g. Paginate(0, 2)) then an exception would be thrown in the extension method ToPaginatedList.
That would mean you would be passing -2 into the
Skip method. The actual text of the ArgumentException is
Count must have a non-negative value. Parameter name: count
Then I thought you possibly wanted to use an index of 1 for the first page instead of 0. But that does not seem to be the case as I got erroneous results testing that theory.
Let me know if you cannot reproduce the error.
Cheers