/// <summary> /// 分页获取列表 /// </summary> /// <param name="userInfo">用户</param> /// <param name="searchValue">查询关键字</param> /// <param name="recordCount">记录数</param> /// <param name="pageIndex">当前页</param> /// <param name="pageSize">每页显示记录条数</param> /// <param name="sortExpression">排序字段</param> /// <returns>数据表</returns> public List <testdemoEntity> GetListByPage(UserInfo userInfo, string searchValue, out int recordCount, int pageIndex = 1, int pageSize = 20, string sortExpression = null) { List <testdemoEntity> list = new List <testdemoEntity>(); var returnRecordCount = 0; var parameter = ParameterUtil.CreateWithOutMessage(userInfo, MethodBase.GetCurrentMethod(), this.serviceName); ServiceUtil.ProcessBusinessDb(userInfo, parameter, dbProvider => { var manager = new testdemoManager(dbProvider, userInfo); var dataTable = manager.GetDTByPage(out returnRecordCount, pageIndex, pageSize, searchValue, sortExpression); list = BaseEntity.GetList <testdemoEntity>(dataTable); }); recordCount = returnRecordCount; return(list); }