/// <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)); }
/// <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)); }
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)); }
public IEnumerable <TEntity> GetList <TEntity>(Expr expr, OrderByExpr orderBy) where TEntity : class { return(this.Manager.GetList <TEntity>(expr, orderBy)); }
public TEntity Get <TEntity>(Expr expr, OrderByExpr orderBy) where TEntity : class { return(this.Manager.Get <TEntity>(expr, orderBy)); }