Skip to content

Instantly share code, notes, and snippets.

@kmteam
Created February 2, 2017 09:03
Show Gist options
  • Save kmteam/8f3106f01a11d7ca1e54ab8f981e419d to your computer and use it in GitHub Desktop.
Save kmteam/8f3106f01a11d7ca1e54ab8f981e419d to your computer and use it in GitHub Desktop.
Pagination magic in LINQ!
var pagedItems = this.DataCollection.Skip((this.CurrentPageIndex -1) * this.ItemsPerPage).Take(this.ItemsPerPage).ToList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment