Guest User

Untitled

a guest
Jun 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public IQueryable Get4Posts(int _pageIndex)
  2. {
  3. BlogDataContext db = new BlogDataContext();
  4.  
  5. var Posts = (from p in db.Blog_Posts
  6. where p.Visible == true
  7. orderby p.Date descending
  8. select new
  9. {
  10. p.Title,
  11. p.Message,
  12. p.User,
  13. p.SenderID,
  14. p.Date
  15.  
  16. }).Skip(_pageIndex*4).Take(4);
  17. return (Posts);
  18. }
Add Comment
Please, Sign In to add comment