Constructor Join
- Namespace
- YndigoBlue.Velocity.Model
- Assembly
- YndigoBlue.Velocity.dll
Join(Table, IFromItem, JoinCondition, JoinType, string, string)
Creates a new join between a table and another table or join.
public Join(Table table, IFromItem fromExpression, JoinCondition joinCondition, JoinType joinType = JoinType.Inner, string tableAlias = null, string fromExpressionAlias = null)
Parameters
tableTableThe left table in the join (appears after FROM).
fromExpressionIFromItemThe right table or join to join with (appears after JOIN).
joinConditionJoinConditionThe condition specifying which columns to join on.
joinTypeJoinTypeThe type of join (Inner, Left, Right, Full, Cross). Defaults to Inner.
tableAliasstringOptional alias for the left table.
fromExpressionAliasstringOptional alias for the right table.
Join(Table, IFromItem, string, JoinType, string, string)
Creates a new join using the same column name on both sides of the join. This is a convenience constructor for the common case where the join column has the same name in both tables.
public Join(Table table, IFromItem fromExpression, string joinColumn, JoinType joinType = JoinType.Inner, string tableAlias = null, string fromExpressionAlias = null)
Parameters
tableTableThe left table in the join (appears after FROM).
fromExpressionIFromItemThe right table or join to join with (appears after JOIN).
joinColumnstringThe name of the column to join on. Must exist with the same name in both tables.
joinTypeJoinTypeThe type of join (Inner, Left, Right, Full, Cross). Defaults to Inner.
tableAliasstringOptional alias for the left table.
fromExpressionAliasstringOptional alias for the right table.
Remarks
This constructor automatically creates the join condition by finding the specified column in both the left and right tables. Use this when your join column names match on both sides.