Repository: dotnet/efcore
File: test/EFCore.Relational.Specification.Tests/Update/ComplexCollectionJsonUpdateTestBase.cs (C#)

Code before:
            modelBuilder.Entity<CompanyWithComplexCollections>(b =>
            {
                b.Property(x => x.Id).ValueGeneratedNever();

                b.ComplexCollection(
                    x => x.Contacts, cb =>
                    {
                        cb.ToJson();
                        cb.PrimitiveCollection(c => c.PhoneNumbers);
                    });

                b.ComplexCollection(
                    x => x.Employees, cb =>
                    {
                        cb.ToJson();
                        cb.PrimitiveCollection(e => e.PhoneNumbers);
                        cb.ComplexProperty(e => e.Address);
                    });

                b.ComplexProperty(
                    x => x.Department, cb =>
                    {
                        cb.ToJson();
                    });
            });
        }

        protected override Task SeedAsync(DbContext context)
        {
            var company = new CompanyWithComplexCollections
            {
                Id = 1,
                Name = "Test Company",
                Contacts =
                [
                    new Contact { Name = "First Contact", PhoneNumbers = ["555-1234", "555-5678"] },
                    new Contact { Name = "Second Contact", PhoneNumbers = ["555-9876", "555-5432"] }
                ],
                Employees =
                [
                    new Employee
                    {
                        Name = "Initial Employee",
                        PhoneNumbers = ["555-0001"],
                        Address = new Address
                        {
                            Street = "100 First St",
                            City = "Initial City",
                            PostalCode = "00001",
                            Country = "USA"
                        }

Review comment (suggestion):
```suggestion
            => modelBuilder.Entity<CompanyWithComplexCollections>(b =>
            {
                b.Property(x => x.Id).ValueGeneratedNever();

                        cb.ToJson();
                    });
            });
```

Code after:
            {
                b.Property(x => x.Id).ValueGeneratedNever();

                b.ComplexCollection(
                    x => x.Contacts, cb =>
                    {
                        cb.ToJson();
                        cb.PrimitiveCollection(c => c.PhoneNumbers);
                    });

                b.ComplexCollection(
                    x => x.Employees, cb =>
                    {
                        cb.ToJson();
                        cb.PrimitiveCollection(e => e.PhoneNumbers);
                        cb.ComplexProperty(e => e.Address);
                    });

                b.ComplexProperty(
                    x => x.Department, cb =>
                    {
                        cb.ToJson();
                    });
            });

        protected override Task SeedAsync(DbContext context)
        {
            var company = new CompanyWithComplexCollections
            {
                Id = 1,
                Name = "Test Company",
                Contacts =
                [
                    new Contact { Name = "First Contact", PhoneNumbers = ["555-1234", "555-5678"] },
                    new Contact { Name = "Second Contact", PhoneNumbers = ["555-9876", "555-5432"] }
                ],
                Employees =
                [
                    new Employee
                    {
                        Name = "Initial Employee",
                        PhoneNumbers = ["555-0001"],
                        Address = new Address
                        {
                            Street = "100 First St",
                            City = "Initial City",
                            PostalCode = "00001",
                            Country = "USA"
                        }
                    }
                ],