Ejemplo n.º 1
0
        public override DbExpression Visit(DbLikeExpression expression)
        {
            Check.NotNull(expression, "expression");

            DbExpression result = expression;

            var newArgument = VisitExpression(expression.Argument);
            var newPattern  = VisitExpression(expression.Pattern);
            var newEscape   = VisitExpression(expression.Escape);

            if (!ReferenceEquals(expression.Argument, newArgument)
                ||
                !ReferenceEquals(expression.Pattern, newPattern)
                ||
                !ReferenceEquals(expression.Escape, newEscape))
            {
                result = CqtBuilder.Like(newArgument, newPattern, newEscape);
            }
            NotifyIfChanged(expression, result);
            return(result);
        }