Repository: dotnet/efcore
File: src/EFCore.Relational/Design/AnnotationCodeGenerator.cs (C#)

Code before:
            RelationalAnnotationNames.Comment, nameof(RelationalPropertyBuilderExtensions.HasComment), methodCallCodeFragments);

        GenerateSimpleFluentApiCall(
            annotations,
            RelationalAnnotationNames.Collation, nameof(RelationalPropertyBuilderExtensions.UseCollation), methodCallCodeFragments);

        methodCallCodeFragments.AddRange(GenerateFluentApiCallsHelper(property, annotations, GenerateFluentApi));

        return methodCallCodeFragments;
    }

    /// <inheritdoc />
    public virtual IReadOnlyList<MethodCallCodeFragment> GenerateFluentApiCalls(
        IComplexProperty complexProperty,
        IDictionary<string, IAnnotation> annotations)
    {
        var methodCallCodeFragments = new List<MethodCallCodeFragment>();

        // JsonPropertyName is now stored on the complex type, not the complex property
        if (complexProperty.ComplexType.FindAnnotation(RelationalAnnotationNames.JsonPropertyName) is { Value: string jsonPropertyName })
        {
            methodCallCodeFragments.Add(
                new MethodCallCodeFragment(
                    nameof(RelationalComplexPropertyBuilderExtensions.HasJsonPropertyName),
                    jsonPropertyName));
        }

        methodCallCodeFragments.AddRange(GenerateFluentApiCallsHelper(complexProperty, annotations, GenerateFluentApi));

        return methodCallCodeFragments;
    }

    /// <inheritdoc />
    public virtual IReadOnlyList<MethodCallCodeFragment> GenerateFluentApiCalls(
        IKey key,
        IDictionary<string, IAnnotation> annotations)
    {
        var methodCallCodeFragments = new List<MethodCallCodeFragment>();

        GenerateSimpleFluentApiCall(
            annotations, RelationalAnnotationNames.Name, nameof(RelationalKeyBuilderExtensions.HasName), methodCallCodeFragments);

        methodCallCodeFragments.AddRange(GenerateFluentApiCallsHelper(key, annotations, GenerateFluentApi));

        return methodCallCodeFragments;
    }

    /// <inheritdoc />
    public virtual IReadOnlyList<MethodCallCodeFragment> GenerateFluentApiCalls(
        IForeignKey foreignKey,
        IDictionary<string, IAnnotation> annotations)

Review comment (suggestion):
@copilot  Instead of this change move the old logic to the GenerateFluentApiCalls method for `IComplexType`

Code after:
            RelationalAnnotationNames.JsonPropertyName, nameof(RelationalPropertyBuilderExtensions.HasJsonPropertyName),
            methodCallCodeFragments);

        GenerateSimpleFluentApiCall(
            annotations,
            RelationalAnnotationNames.Comment, nameof(RelationalPropertyBuilderExtensions.HasComment), methodCallCodeFragments);

        GenerateSimpleFluentApiCall(
            annotations,
            RelationalAnnotationNames.Collation, nameof(RelationalPropertyBuilderExtensions.UseCollation), methodCallCodeFragments);

        methodCallCodeFragments.AddRange(GenerateFluentApiCallsHelper(property, annotations, GenerateFluentApi));

        return methodCallCodeFragments;
    }

    /// <inheritdoc />
    public virtual IReadOnlyList<MethodCallCodeFragment> GenerateFluentApiCalls(
        IComplexProperty complexProperty,
        IDictionary<string, IAnnotation> annotations)
    {
        var methodCallCodeFragments = new List<MethodCallCodeFragment>();

        methodCallCodeFragments.AddRange(GenerateFluentApiCallsHelper(complexProperty, annotations, GenerateFluentApi));

        return methodCallCodeFragments;
    }

    /// <inheritdoc />
    public virtual IReadOnlyList<MethodCallCodeFragment> GenerateFluentApiCalls(
        IKey key,
        IDictionary<string, IAnnotation> annotations)
    {
        var methodCallCodeFragments = new List<MethodCallCodeFragment>();

        GenerateSimpleFluentApiCall(
            annotations, RelationalAnnotationNames.Name, nameof(RelationalKeyBuilderExtensions.HasName), methodCallCodeFragments);

        methodCallCodeFragments.AddRange(GenerateFluentApiCallsHelper(key, annotations, GenerateFluentApi));

        return methodCallCodeFragments;
    }

    /// <inheritdoc />
    public virtual IReadOnlyList<MethodCallCodeFragment> GenerateFluentApiCalls(
        IForeignKey foreignKey,
        IDictionary<string, IAnnotation> annotations)
    {
        var methodCallCodeFragments = new List<MethodCallCodeFragment>();

        GenerateSimpleFluentApiCall(