Repository: dotnet/efcore
File: src/EFCore/Query/Internal/ExpressionTreeFuncletizer.cs (C#)

Code before:
                    return EvaluateCore(unaryExpression.Operand, ref evaluateAsParameter, out parameterName, out isContextAccessor);
            }

            try
            {
                return Lambda<Func<object>>(
                        Convert(expression, typeof(object)))
                    .Compile(preferInterpretation: true)
                    .Invoke();
            }
            catch (Exception exception)
            {
                throw new InvalidOperationException(
                    _logger.ShouldLogSensitiveData()
                        ? CoreStrings.ExpressionParameterizationExceptionSensitive(expression)
                        : CoreStrings.ExpressionParameterizationException,
                    exception);
            }
        }

        static string SanitizeCompilerGeneratedName(string s)
        {
            // Compiler-generated field names intentionally contain illegal characters, specifically angle brackets <>.
            // In cases where there's something within the angle brackets, that tends to be the original user-provided variable name
            // (e.g. <PropertyName>k__BackingField). If we see angle brackets, extract that out, of it the angle brackets contain no
            // contain, strip them out entirely.
            var closingBracket = s.IndexOf('>');
            if (closingBracket == -1)
            {
                return s;
            }

            var openingBracket = s.IndexOf('<');
            if (openingBracket < closingBracket - 1)
            {
                // There's content inside the angle brackets - return that.
                return s[(openingBracket + 1)..closingBracket];
            }

            // No content - return the content after closing angle bracket.
            return s[(closingBracket + 1)..];
        }
    }

    private Expression ConvertIfNeeded(Expression expression, Type type)
        => expression.Type == type ? expression : Visit(Convert(expression, type));

    private bool IsGenerallyEvaluatable(Expression expression)
        => _evaluatableExpressionFilter.IsEvaluatableExpression(expression, _model)
            && (_parameterize
                // Don't evaluate QueryableMethods if in compiled query

Review comment (refactor):
The comment contains a grammatical error. The phrase "of it the angle brackets contain no contain" appears to be malformed. It should read "or if the angle brackets contain nothing" or similar.
```suggestion
            // (e.g. <PropertyName>k__BackingField). If we see angle brackets, extract that out; if the angle brackets contain nothing,
            // strip them out entirely.
```

Code after:
                    return EvaluateCore(unaryExpression.Operand, ref evaluateAsParameter, out parameterName, out isContextAccessor);
            }

            try
            {
                return Lambda<Func<object>>(
                        Convert(expression, typeof(object)))
                    .Compile(preferInterpretation: true)
                    .Invoke();
            }
            catch (Exception exception)
            {
                throw new InvalidOperationException(
                    _logger.ShouldLogSensitiveData()
                        ? CoreStrings.ExpressionParameterizationExceptionSensitive(expression)
                        : CoreStrings.ExpressionParameterizationException,
                    exception);
            }
        }

        static string SanitizeCompilerGeneratedName(string s)
        {
            // Compiler-generated field names intentionally contain illegal characters, specifically angle brackets <>.
            // In cases where there's something within the angle brackets, that tends to be the original user-provided variable name
            // (e.g. <PropertyName>k__BackingField). If we see angle brackets, extract that out, or it the angle brackets contain no
            // content, strip them out entirely and take what comes after.
            var closingBracket = s.IndexOf('>');
            if (closingBracket == -1)
            {
                return s;
            }

            var openingBracket = s.IndexOf('<');

            return openingBracket != -1 && openingBracket < closingBracket - 1
                ? s[(openingBracket + 1)..closingBracket]
                : s[(closingBracket + 1)..];
        }
    }

    private Expression ConvertIfNeeded(Expression expression, Type type)
        => expression.Type == type ? expression : Visit(Convert(expression, type));

    private bool IsGenerallyEvaluatable(Expression expression)
        => _evaluatableExpressionFilter.IsEvaluatableExpression(expression, _model)
            && (_parameterize
                // Don't evaluate QueryableMethods if in compiled query
                || !(expression is MethodCallExpression { Method: var method } && method.DeclaringType == typeof(Queryable)));

    private bool IsParameterParameterizable(MethodInfo method, ParameterInfo parameter)
        => parameter.GetCustomAttribute<NotParameterizedAttribute>() is null