public List <UserDTO> GetUsers() { var users = _unitOfWork.UsersManager.Users.ToList(); var usersMapped = UserDTOHelper.EntitiesToDTO(users); return(usersMapped); }
public List <UserDTO> GetPaged(int pageNumber, int pageSize) { int skip = (pageNumber - 1) * pageSize; var users = _unitOfWork.UsersManager.Users .OrderBy(c => c.Id) .Skip(skip) .Take(pageSize) .ToList(); var usersMapped = UserDTOHelper.EntitiesToDTO(users); return(usersMapped); }