SqlPreparationExpressionVisitor transforms the expressions stored by SqlStatement to a SQL-specific format.
Inheritance: System.Linq.Expressions.ExpressionTreeVisitor, ISqlSubStatementVisitor, IPartialEvaluationExceptionExpressionVisitor
    public static Expression TranslateExpression (
        Expression expression,
        ISqlPreparationContext context,
        ISqlPreparationStage stage,
        IMethodCallTransformerProvider provider)
    {
      ArgumentUtility.CheckNotNull ("expression", expression);
      ArgumentUtility.CheckNotNull ("context", context);
      ArgumentUtility.CheckNotNull ("stage", stage);
      ArgumentUtility.CheckNotNull ("provider", provider);

      var visitor = new SqlPreparationExpressionVisitor (context, stage, provider);
      var result = visitor.VisitExpression (expression);
      return result;
    }
Esempio n. 2
0
        public static Expression TranslateExpression(
            Expression expression,
            ISqlPreparationContext context,
            ISqlPreparationStage stage,
            IMethodCallTransformerProvider provider)
        {
            ArgumentUtility.CheckNotNull("expression", expression);
            ArgumentUtility.CheckNotNull("context", context);
            ArgumentUtility.CheckNotNull("stage", stage);
            ArgumentUtility.CheckNotNull("provider", provider);

            var visitor = new SqlPreparationExpressionVisitor(context, stage, provider);
            var result  = visitor.Visit(expression);

            return(result);
        }
Esempio n. 3
0
        protected virtual Expression PrepareExpression(Expression expression, ISqlPreparationContext context)
        {
            ArgumentUtility.CheckNotNull("expression", expression);

            return(SqlPreparationExpressionVisitor.TranslateExpression(expression, context, this, _methodCallTransformerProvider));
        }