/// <summary> /// 关联表信息 /// </summary> /// <param name="table"></param> /// <param name="where"></param> public QueryCreator Join(JoinType joinType, Table table, WhereClip where) { if (!this.joinTables.ContainsKey(table.OriginalName)) { TableJoin join = new TableJoin() { Table = table, Type = JoinType.LeftJoin, Where = where }; this.joinTables.Add(table.OriginalName, join); } return(this); }
/// <summary> /// 关联表信息 /// </summary> /// <param name="tableName"></param> /// <param name="where"></param> /// <param name="parameters"></param> /// <returns></returns> public QueryCreator Join(JoinType joinType, string tableName, string where, params SQLParameter[] parameters) { Table t = new Table(tableName); if (!this.joinTables.ContainsKey(t.OriginalName)) { TableJoin join = new TableJoin() { Table = t, Type = joinType, Where = new WhereClip(where, parameters) }; this.joinTables.Add(t.OriginalName, join); } return(this); }