标签:contexts icc 分页 size count HERE count() queryable slot
public List<SongList> SongLists(int pageIndex, int pageSize, out int totaPage)
{
var quaryable = Dataslot.MusicContexts.SongList.AsQueryable();
quaryable = quaryable.Where(m => m.Slid != 0);
int totalCount = quaryable.Count();
var mylist = quaryable.OrderBy(m => m.Slid).Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
//获取分页后的总条数
totaPage = (totalCount - 1) / pageSize + 1;
return mylist;
}
标签:contexts icc 分页 size count HERE count() queryable slot
原文地址:https://www.cnblogs.com/hanzhuopeng/p/11991612.html