我有一个关于Skip-Take的问题。您可以在下面找到我的代码块。通常,我有9个项目。当我尝试使用Skip-Take并且我想在每个页面上取4个项目时,结果返回如下:page index = 1 item count = 3,page index = 2 item count = 2,page index = 3 item count = 2
感谢您的回答。
var DoktorAdlari = (from i in RandevuEslesmeEntity.Query()
join dktr in DoktorTanimEntity.Query() on i.KaynakId equals dktr.Id
join prsnl in PersonelEntity.Query() on dktr.PersonelId equals prsnl.Id
where i.Silindi == false
select new{ doktor = prsnl.Adi})
.ToList()
.Skip(4 * (model.Page.Value-1))
.Take(4)
.GroupBy(p => new { p.id, p.doktor })
.ToList();