コード例 #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));
        }
コード例 #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));
        }
コード例 #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));
 }
コード例 #4
0
 public IEnumerable <TEntity> GetList <TEntity>(Expr expr, OrderByExpr orderBy) where TEntity : class
 {
     return(this.Manager.GetList <TEntity>(expr, orderBy));
 }
コード例 #5
0
 public TEntity Get <TEntity>(Expr expr, OrderByExpr orderBy) where TEntity : class
 {
     return(this.Manager.Get <TEntity>(expr, orderBy));
 }