调用接口,分批方法:
double num = Math.Ceiling((double)views.Count / (double)pageSize);
List<List<TViewModel>> list = new List<List<TViewModel>>();
for (int i = 0; (double)i < num; i++)
{
List<TViewModel> item = views.Skip(i * pageSize).Take(pageSize).ToList();
list.Add(item);
}
return list;