Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IQueryable Get4Posts(int _pageIndex)
- {
- BlogDataContext db = new BlogDataContext();
- var Posts = (from p in db.Blog_Posts
- where p.Visible == true
- orderby p.Date descending
- select new
- {
- p.Title,
- p.Message,
- p.User,
- p.SenderID,
- p.Date
- }).Skip(_pageIndex*4).Take(4);
- return (Posts);
- }
Add Comment
Please, Sign In to add comment