-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Hi,
The MemberExtendedService has a bug in the PerformExamineSearch function, this causes the first page to load when you click "next" or "2" in the pager, and makes the last page inaccessible.
The problem is following code, it already has a pageindex and substracts 1 from is, causing index:0 to be -1 and index 1 to be 0, and so on. I made my own implementation of the servcie and registered it, to confirm that removing the "-1" fixes this problem
if (pageSize > 0)
{
int skipCount = (pageIndex > 0 && pageSize > 0) ? Convert.ToInt32((pageIndex -1) * pageSize) : 0;
if (totalRecords < skipCount)
{
skipCount = (int)totalRecords / pageSize;
}
return results.Skip(skipCount).Take(pageSize);
}
tormnator
Metadata
Metadata
Assignees
Labels
No labels