示例#1
0
 public IList <T> List <T>(JoinTable table, params string[] orders) where T : new()
 {
     using (IConnectinContext cc = DBContext.GetConnection(DBContext.CurrentConnectionName))
     {
         return(List <T>(table, cc, null, null));
     }
 }
示例#2
0
        public IList <T> List <T>(JoinTable table, IConnectinContext cc, Region region, params string[] orders) where T : new()
        {
            TimeWatch.Start("Peanut->Express JoinTable to list");
            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);

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