public void ShowAuthorsPaged(SqlCeDataStore store) { Author[] authors; int offset = 0; int page = 0; int authorsPerPage = 10; do { authors = store.Fetch <Author>(authorsPerPage, offset, "Name").ToArray(); offset += authors.Length; Debug.WriteLine(string.Format("Authors page {0}", page)); for (int a = 0; a < authors.Length; a++) { Debug.WriteLine(string.Format(" ID: {0} Name: {1}", authors[a].AuthorID, authors[a].Name)); } page++; }while (authors.Length > 0); }
public void ShowAuthorsPaged(SqlCeDataStore store) { Author[] authors; int offset = 0; int page = 0; int authorsPerPage = 10; do { authors = store.Fetch<Author>(authorsPerPage, offset, "Name"); offset += authors.Length; Debug.WriteLine(string.Format("Authors page {0}", page)); for (int a = 0; a < authors.Length; a++) { Debug.WriteLine(string.Format(" ID: {0} Name: {1}", authors[a].AuthorID, authors[a].Name)); } page++; } while (authors.Length > 0); }