Exemple #1
0
        public override object Visit(ValueExpression value)
        {
            value.NonNull(nameof(value));

            if (value.Value == null)
            {
                m_Sql.Append(NullLiteral);
                return(m_Sql);
            }

            if (HandlePrimitiveValue(value))
            {
                m_Sql.Append(value.Value.ToString());
                return(m_Sql);
            }

            var p = MakeAndAssignParameter(value);

            m_Sql.Append(ParameterOpenSpan);
            m_Sql.Append(p.ParameterName);
            m_Sql.Append(ParameterCloseSpan);
            m_Parameters.Add(p);

            return(m_Sql);
        }
Exemple #2
0
 public override object Visit(ValueExpression value)
 {
     value.NonNull(nameof(value));
     return(value.Value);
 }