Exemple #1
0
 public IList <T> List <T>(JoinTable table, params string[] orders) where T : new()
 {
     using (IConnectinContext cc = DBContext.GetConnection(DB.DB1))
     {
         return(List <T>(table, cc, null, null));
     }
 }
Exemple #2
0
        public IList <T> List <T>(JoinTable table, IConnectinContext cc, Region region, params string[] orders) where T : new()
        {
            SQL sql = new SQL(table.ToString());

            if (this.SqlText.Length > 0)
            {
                sql.AddSql(" where " + this.ToString());
                foreach (Command.Parameter p in this.Parameters)
                {
                    sql.Parameter(p.Name, p.Value);
                }
            }
            if (orders != null && orders.Length > 0)
            {
                sql.AddSql(" order by " + string.Join(",", orders));
            }
            IList <T> result = sql.List <T>(cc, region);

            return(result);
        }
Exemple #3
0
 public IList <T> List <T>(JoinTable table) where T : new()
 {
     return(List <T>(table, (string)null));
 }
Exemple #4
0
 public IList <T> List <T>(JoinTable table, Region region) where T : new()
 {
     return(List <T>(table, region, null));
 }
Exemple #5
0
 public IList <T> List <T>(JoinTable table, IConnectinContext cc) where T : new()
 {
     return(List <T>(table, cc, null, null));
 }