Esempio n. 1
0
        /// <summary>
        /// 查询列表
        /// </summary>
        public IEnumerable <TEntity> GetList <TEntity>(Expr expr, OrderByExpr orderBy, int startPage, int endPage) where TEntity : class
        {
            DynamicParameters parameters   = new DynamicParameters();
            string            selectString = string.Format(this.Config.SelectPage, expr.ToWhere(parameters), orderBy.ToOrderBy(), startPage, endPage);

            return(this.Connection.Query <TEntity>(selectString, parameters, this.Transaction));
        }
Esempio n. 2
0
        /// <summary>
        /// 查询实体
        /// </summary>
        public TEntity Get <TEntity>(Expr expr, OrderByExpr orderBy) where TEntity : class
        {
            DynamicParameters parameters   = new DynamicParameters();
            string            selectString = string.Format(this.Config.SelectTopOrder, 1, expr.ToWhere(parameters), orderBy.ToOrderBy());

            return(this.Connection.QueryFirstOrDefault <TEntity>(selectString, parameters, this.Transaction));
        }
Esempio n. 3
0
 public IEnumerable <TEntity> GetList <TEntity>(Expr expr, OrderByExpr orderBy, int startPage, int endPage) where TEntity : class
 {
     return(this.Manager.GetList <TEntity>(expr, orderBy, startPage, endPage));
 }
Esempio n. 4
0
 public IEnumerable <TEntity> GetList <TEntity>(Expr expr, OrderByExpr orderBy) where TEntity : class
 {
     return(this.Manager.GetList <TEntity>(expr, orderBy));
 }
Esempio n. 5
0
 public TEntity Get <TEntity>(Expr expr, OrderByExpr orderBy) where TEntity : class
 {
     return(this.Manager.Get <TEntity>(expr, orderBy));
 }