/// <summary> /// Translates the <paramref name="existsExpression"/> into a string representation. /// </summary> /// <param name="existsExpression">The <see cref="DbExistsExpression"/> to translate.</param> /// <returns><see cref="string"/></returns> protected override DbExpression VisitExistsExpression(DbExistsExpression existsExpression) { var syntax = string.Format("EXISTS{0}", Visit(existsExpression.SubSelectExpression)); return ExpressionFactory.Sql(syntax); }
/// <summary> /// Translates the <paramref name="existsExpression"/> into a string representation. /// </summary> /// <param name="existsExpression">The <see cref="DbExistsExpression"/> to translate.</param> /// <returns><see cref="string"/></returns> protected override DbExpression VisitExistsExpression(DbExistsExpression existsExpression) { var syntax = string.Format("EXISTS{0}", Visit(existsExpression.SubSelectExpression)); return(ExpressionFactory.Sql(syntax)); }
/// <summary> /// Translates the <paramref name="existsExpression"/> into a string representation. /// </summary> /// <param name="existsExpression">The <see cref="DbExistsExpression"/> to translate.</param> /// <returns><see cref="DbExpression"/></returns> protected virtual DbExpression VisitExistsExpression(DbExistsExpression existsExpression) { var subSelectExpression = Visit(existsExpression.SubSelectExpression); if (!ReferenceEquals(existsExpression.SubSelectExpression, subSelectExpression)) return ExpressionFactory.Exists((DbQuery<DbSelectExpression>)subSelectExpression); return existsExpression; }