private void ShowEmployees() { try { int numberOfEmployees = appManager.CountEmployees(); int i = 0; do { i++; Pageable pageable = new Pageable(); pageable.setPageNumber(i); pageable.setPageSize(Constants.PAGE_SIZE); Page <Domain.Employee> page = appManager.GetEmployeePage(pageable); String pageToString = string.Format("---------------------- PAGE {0} : ------------------------------", i); Console.WriteLine(pageToString); foreach (var item in page.getItems()) { Console.WriteLine(item); } }while (i * Constants.PAGE_SIZE < numberOfEmployees); } catch (ServiceException e) { Trace.WriteLine("showStudents - ServiceException " + e.Message); } }