You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 ofPaginate
, which takesPageIndex
andPageSize
as parameters, and passed in aPageIndex
of 0 (e.g.Paginate(0, 2)
) then an exception would be thrown in the extension methodToPaginatedList
.That would mean you would be passing -2 into the
Skip
method. The actual text of theArgumentException
isThen 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
The text was updated successfully, but these errors were encountered: