EF分页
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;
}