var q = (from Comments in db.tblBlogComments where Comments.blogID == this.ID orderby Comments.date descending select new {
Comments.userID,Comments.comment,Comments.date
});
这将返回所有关联的记录,我最好如何选择记录#10到#20,这样我就不会加载任何冗余数据?
解决方法
怎么样:
var q = (
from Comments in db.tblBlogComments
where Comments.blogID == this.ID
orderby Comments.date descending
select new { Comments.userID,Comments.date }).Skip(10).Take(10);
