I think the GetAll call has been written to deal with paging in case you have loads of users.
to get all users
int total = 0;
var users = _userService.GetAll(0, int.MaxValue, out total);
users will be the users
total will be how many users you have.
this will do, but the call is designed so you can loop through so if you have lots (like 1000's of users). something like*
int pageSize = 1000;
int total = 0;
int index = 0;
do {
var someUsers = _userService.GetAll(index, pageSize, total)
// ... you will have users in 1000's
index += total;
} while ( total == pageSize )
*i would check this, just typed it into the comment, it's never actually been compiled
UserService GetAll method parameters
Hi,
I am trying to fetch all the users using UserService however I am little bit confused about the GetAll parameters as below:
any idea about pageIndex, pageSize, totalRecords?from where we can identify these values?
Regards, Harsh
Hi
I think the GetAll call has been written to deal with paging in case you have loads of users.
to get all users
users will be the users total will be how many users you have.
this will do, but the call is designed so you can loop through so if you have lots (like 1000's of users). something like*
*i would check this, just typed it into the comment, it's never actually been compiled
is working on a reply...