public override JoinExpression GetJoinExpression() { var rightIdentifier = AliasIdentifierExpression; var leftIdentifier = Left.AliasIdentifierExpression; var onCondition = default(QueryExpression); foreach (var columnPair in _joinColumnPairs) { var newCondition = QueryExpression.Compare( QueryExpression.Column(columnPair.LeftColumnName, leftIdentifier), ComparisonOperator.AreEqual, QueryExpression.Column(columnPair.RightColumnName, rightIdentifier) ); onCondition = QueryExpression.CombineConditions(onCondition, ConditionType.AndAlso, newCondition); } return(QueryExpression.Join( QueryExpression.Alias( Right.AliasIdentifierExpression, rightIdentifier.Identifier ), onCondition, JoinDirection.Left )); }
public void OrElse(QueryExpression queryExpression) => _expression = QueryExpression.CombineConditions( _expression, ConditionType.OrElse, queryExpression );
public void AndAlso(QueryExpression queryExpression) => _expression = QueryExpression.CombineConditions( _expression, ConditionType.AndAlso, queryExpression );