Represents a prefixed DbExpression
Inheritance: DbExpression
        /// <summary>
        /// Translates the <paramref name="prefixExpression"/> into a string representation.
        /// </summary>
        /// <param name="prefixExpression">The <see cref="DbPrefixExpression"/> to translate.</param>
        /// <returns><see cref="DbExpression"/></returns>
        protected virtual DbExpression VisitPrefixExpression(DbPrefixExpression prefixExpression)
        {
            var targetExpression = Visit(prefixExpression.Target);

            if (!ReferenceEquals(targetExpression, prefixExpression.Target))
            {
                return(ExpressionFactory.Prefix(targetExpression, prefixExpression.Prefix));
            }
            return(prefixExpression);
        }
        /// <summary>
        /// Translates the <paramref name="prefixExpression"/> into a string representation.
        /// </summary>
        /// <param name="prefixExpression">The <see cref="DbPrefixExpression"/> to translate.</param>
        /// <returns><see cref="string"/></returns>
        protected override DbExpression VisitPrefixExpression(DbPrefixExpression prefixExpression)
        {
            string syntax = string.Format("[{0}].{1}", prefixExpression.Prefix, Visit(prefixExpression.Target));

            return(ExpressionFactory.Sql(syntax));
        }
 /// <summary>
 /// Translates the <paramref name="prefixExpression"/> into a string representation.
 /// </summary>
 /// <param name="prefixExpression">The <see cref="DbPrefixExpression"/> to translate.</param>
 /// <returns><see cref="DbExpression"/></returns>
 protected virtual DbExpression VisitPrefixExpression(DbPrefixExpression prefixExpression)
 {
     var targetExpression = Visit(prefixExpression.Target);
     if (!ReferenceEquals(targetExpression, prefixExpression.Target))
         return ExpressionFactory.Prefix(targetExpression, prefixExpression.Prefix);
     return prefixExpression;
 }
 /// <summary>
 /// Translates the <paramref name="prefixExpression"/> into a string representation.
 /// </summary>
 /// <param name="prefixExpression">The <see cref="DbPrefixExpression"/> to translate.</param>
 /// <returns><see cref="string"/></returns>
 protected override DbExpression VisitPrefixExpression(DbPrefixExpression prefixExpression)
 {
     string syntax = string.Format("\"{0}\".{1}", prefixExpression.Prefix, Visit(prefixExpression.Target));
     return ExpressionFactory.Sql(syntax);
 }
Example #5
0
        /// <summary>
        /// Translates the <paramref name="prefixExpression"/> into a string representation.
        /// </summary>
        /// <param name="prefixExpression">The <see cref="DbPrefixExpression"/> to translate.</param>
        /// <returns><see cref="string"/></returns>
        protected override DbExpression VisitPrefixExpression(DbPrefixExpression prefixExpression)
        {
            string syntax = string.Format("{0}.{1}", QuoteIdentifier(prefixExpression.Prefix), Visit(prefixExpression.Target));

            return(ExpressionFactory.Sql(syntax));
        }