Example #1
0
 /// <summary>
 /// 查找分页列表
 /// </summary>
 /// <param name="pageSize">每页记录数。必须大于1</param>
 /// <param name="pageIndex">页码。首页从1开始,页码必须大于1</param>
 /// <param name="totalNumber">总记录数</param>
 /// <param name="where">查询表达式</param>
 /// <param name="orderParam">排序【null-不设置】</param>
 /// <returns></returns>
 public IQueryable <T> FindPageList(int pageSize, int pageIndex, out int totalNumber, Expression <Func <T, bool> > where, OrderParam orderParam)
 {
     OrderParam[] _orderParams = null;
     if (orderParam != null)
     {
         _orderParams = new OrderParam[] { orderParam }
     }
     ;
     return(FindPageList(pageSize, pageIndex, out totalNumber, where, _orderParams));
 }
Example #2
0
        /// <summary>
        /// 查找分页列表
        /// </summary>
        /// <param name="pageSize">每页记录数。必须大于1</param>
        /// <param name="pageIndex">页码。首页从1开始,页码必须大于1</param>
        /// <param name="totalNumber">总记录数</param>
        /// <param name="where">查询表达式</param>
        /// <returns></returns>
        public IQueryable <T> FindPageList(int pageSize, int pageIndex, out int totalNumber, Expression <Func <T, bool> > where)
        {
            OrderParam _orderParam = null;

            return(FindPageList(pageSize, pageIndex, out totalNumber, where, _orderParam));
        }
Example #3
0
        /// <summary>
        /// 查找分页列表
        /// </summary>
        /// <param name="pageSize">每页记录数。必须大于1</param>
        /// <param name="pageIndex">页码。首页从1开始,页码必须大于1</param>
        /// <param name="totalNumber">总记录数</param>
        /// <returns></returns>
        public IQueryable <T> FindPageList(int pageSize, int pageIndex, out int totalNumber)
        {
            OrderParam _orderParam = null;

            return(FindPageList(pageSize, pageIndex, out totalNumber, _orderParam));
        }
Example #4
0
 /// <summary>
 /// 查找分页列表
 /// </summary>
 /// <param name="pageSize">每页记录数。必须大于1</param>
 /// <param name="pageIndex">页码。首页从1开始,页码必须大于1</param>
 /// <param name="totalNumber">总记录数</param>
 /// <param name="orderParam">是否排序</param>
 /// <returns></returns>
 public IQueryable <T> FindPageList(int pageSize, int pageIndex, out int totalNumber, OrderParam orderParam)
 {
     return(FindPageList(pageSize, pageIndex, out totalNumber, (T) => true, orderParam));
 }
Example #5
0
 /// <summary>
 /// 查找实体列表
 /// </summary>
 /// <param name="where">查询Lambda表达式</param>
 /// <param name="orderParam">排序参数</param>
 /// <returns></returns>
 public IQueryable <T> FindList(Expression <Func <T, bool> > where, OrderParam orderParam)
 {
     return(FindList(where, orderParam, 0));
 }