DbExpressions.SQLiteQueryTranslator.VisitJoinExpression C# (CSharp) Method

VisitJoinExpression() protected method

Translates the joinExpression into a string representation.
protected VisitJoinExpression ( DbJoinExpression joinExpression ) : DbExpression
joinExpression DbJoinExpression The to translate.
return DbExpression
        protected override DbExpression VisitJoinExpression(DbJoinExpression joinExpression)
        {
            string body;
            switch (joinExpression.JoinExpressionType)
            {
                case DbJoinExpressionType.InnerJoin:
                    body = "INNER JOIN {0} ON {1}";
                    break;
                case DbJoinExpressionType.LeftOuterJoin:
                    body = "LEFT OUTER JOIN {0} ON {1}";
                    break;
                case DbJoinExpressionType.RightOuterJoin:
                   throw new NotSupportedException("Right outer joins are not supported by SQLite");
                default:
                    throw new ArgumentOutOfRangeException("joinExpression",
                                                          string.Format(
                                                              "The JoinExpressionType '{0}' is not supported",
                                                              joinExpression.JoinExpressionType));
            }

            string syntax = string.Format(body, Visit(joinExpression.Target), Visit(joinExpression.Condition));
            return ExpressionFactory.Sql(syntax);
        }