protected override Expression VisitLike(LikeExpression likeExpression) { var parentSearchCondition = _isSearchCondition; _isSearchCondition = false; var match = (SqlExpression)Visit(likeExpression.Match); var pattern = (SqlExpression)Visit(likeExpression.Pattern); var escapeChar = (SqlExpression)Visit(likeExpression.EscapeChar); _isSearchCondition = parentSearchCondition; return(ApplyConversion(likeExpression.Update(match, pattern, escapeChar), condition: true)); }
private LikeExpression VisitLikeExpression(LikeExpression likeExpression) { var newMatch = (SqlExpression)Visit(likeExpression.Match); var isNullable = _isNullable; var newPattern = (SqlExpression)Visit(likeExpression.Pattern); isNullable |= _isNullable; var newEscapeChar = (SqlExpression)Visit(likeExpression.EscapeChar); _isNullable |= isNullable; return(likeExpression.Update(newMatch, newPattern, newEscapeChar)); }
protected override Expression VisitLike(LikeExpression likeExpression) { Check.NotNull(likeExpression, nameof(likeExpression)); var parentOptimize = _optimize; _optimize = false; var match = (SqlExpression)Visit(likeExpression.Match); var pattern = (SqlExpression)Visit(likeExpression.Pattern); var escapeChar = (SqlExpression)Visit(likeExpression.EscapeChar); _optimize = parentOptimize; return(ApplyConversion(likeExpression.Update(match, pattern, escapeChar), condition: true)); }
protected override Expression VisitLike(LikeExpression likeExpression) { var canOptimize = _canOptimize; _canOptimize = false; _isNullable = false; var newMatch = (SqlExpression)Visit(likeExpression.Match); var isNullable = _isNullable; _isNullable = false; var newPattern = (SqlExpression)Visit(likeExpression.Pattern); isNullable |= _isNullable; _isNullable = false; var newEscapeChar = (SqlExpression)Visit(likeExpression.EscapeChar); _isNullable |= isNullable; _canOptimize = canOptimize; return(likeExpression.Update(newMatch, newPattern, newEscapeChar)); }
protected override Expression VisitLike(LikeExpression x) { return(x?.Update(x.Match.VisitNode(this), x.Pattern.VisitNode(this), x.EscapeChar.VisitNode(this))); }