/// <summary> /// Creates a new joined table. /// </summary> /// <param name="kind">The kind to consider.</param> /// <param name="table1Alias">The alias of the table 1 to consider.</param> /// <param name="table2Alias">The alias of the table 2 to consider.</param> /// <returns>Returns a new From statement.</returns> public DbJoinedTable TableAsJoin <T, T1, T2>( DbQueryJoinKind kind, string table1Alias = null, string table2Alias = null) { var conditionScript = JoinCondition <T1, T2>(table1Alias, table2Alias); return(DbFluent.TableAsJoin(kind, Table <T>(), conditionScript)); }
// Join -------------------------------- /// <summary> /// Creates a new joined table. /// </summary> /// <param name="kind">The kind to consider.</param> /// <param name="table">The table to consider.</param> /// <param name="expression">The expression to consider.</param> /// <returns>Returns a new From statement.</returns> public static DbJoinedTable TableAsJoin(DbQueryJoinKind kind, DbTable table, DataExpression expression) => new DbJoinedTable() { Kind = kind, Table = table }.WithCondition(expression);
/// <summary> /// Creates a new joined table. /// </summary> /// <param name="kind">The kind to consider.</param> /// <param name="condition">The condition to consider.</param> /// <returns>Returns a new From statement.</returns> public DbJoinedTable TableAsJoin <T>(DbQueryJoinKind kind, DataExpression condition) { return(TableAsJoin(typeof(T).Name, kind, condition)); }
// As Join ------------------------------------- /// <summary> /// Creates a new joined table. /// </summary> /// <param name="name"></param> /// <param name="kind">The kind to consider.</param> /// <param name="condition">The condition to consider.</param> /// <returns>Returns a new From statement.</returns> public DbJoinedTable TableAsJoin(string name, DbQueryJoinKind kind, DataExpression condition) { return(DbFluent.TableAsJoin(kind, Table(name), condition)); }
/// <summary> /// Instantiates a new instance of the DbQueryJoinedTable class. /// </summary> /// <param name="kind">The kind to consider.</param> /// <param name="table">The table to consider.</param> /// <returns>Returns a new From statement.</returns> public DbJoinedTable(DbQueryJoinKind kind, DbTable table) { Kind = kind; Table = table; }