orm分页方式可使用SetSelectRange方法
例如:
var session = LepulsDB.DBContext.EA_ExpenseAccount.Select().Where(m => m.CreateId == SiteId)
.SetSelectRange(search.PageSize, search.SkipCount);
int total = session.GetTotalForPaging(); //得到总条数
var list = session.ToList().Select(m => m.ToDynamicMapper<ExpenseAccountModel>()).ToPaginationList(total);//返回list和总条数
return list;
//调用方式
var list = _accInfoExtService.GetConfResponseLevelList(search);
var index = 1;
list.ForEach(m => m.Index = index++);
request.Datas = list;
request.TotalCount = list.GetTotalForPaging();//取出list中的总条数