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

Code before:
                        x => x == 0 ? false : true,
                        x => x == false ? 0 : 1));

                b.Property(x => x.StringTrueFalseConvertedToBool).HasConversion(
                    new ValueConverter<string, bool>(
                        x => x == "True" ? true : false,
                        x => x == true ? "True" : "False"));

                b.Property(x => x.StringYNConvertedToBool).HasConversion(
                    new ValueConverter<string, bool>(
                        x => x == "Y" ? true : false,
                        x => x == true ? "Y" : "N"));
            });

        modelBuilder.Entity<JsonEntityBasicForReference>(
            b =>
            {
                b.Property(x => x.Id);
                b.Property(x => x.Name);
            });

        modelBuilder.Entity<JsonEntityHasComplexChild>().OwnsOne(x => x.EntityReference, b =>
        {
            b.ToJson();
            b.OwnsOne(x => x.AEntityReference, bb =>
            {
                bb.ToJson();
            });
        });

        base.OnModelCreating(modelBuilder, context);
    }

    protected override Task SeedAsync(JsonQueryContext context)
    {
        var jsonEntitiesBasic = JsonQueryData.CreateJsonEntitiesBasic();
        var jsonEntitiesInheritance = JsonQueryData.CreateJsonEntitiesInheritance();
        var jsonEntitiesAllTypes = JsonQueryData.CreateJsonEntitiesAllTypes();
        var jsonEntitiesConverters = JsonQueryData.CreateJsonEntitiesConverters();

        context.JsonEntitiesBasic.AddRange(jsonEntitiesBasic);
        context.JsonEntitiesInheritance.AddRange(jsonEntitiesInheritance);
        context.JsonEntitiesAllTypes.AddRange(jsonEntitiesAllTypes);
        context.JsonEntitiesConverters.AddRange(jsonEntitiesConverters);

        return context.SaveChangesAsync();
    }
}


Review comment (suggestion):
```suggestion
            b.Property(x => x.Id).ValueGeneratedNever();
            b.ToJson();
```

Code after:
                        x => x == 0 ? false : true,
                        x => x == false ? 0 : 1));

                b.Property(x => x.StringTrueFalseConvertedToBool).HasConversion(
                    new ValueConverter<string, bool>(
                        x => x == "True" ? true : false,
                        x => x == true ? "True" : "False"));

                b.Property(x => x.StringYNConvertedToBool).HasConversion(
                    new ValueConverter<string, bool>(
                        x => x == "Y" ? true : false,
                        x => x == true ? "Y" : "N"));
            });

        modelBuilder.Entity<JsonEntityBasicForReference>(
            b =>
            {
                b.Property(x => x.Id);
                b.Property(x => x.Name);
            });

        modelBuilder.Entity<JsonEntityHasComplexChild>().Property(x => x.Id).ValueGeneratedNever();
        modelBuilder.Entity<JsonEntityHasComplexChild>().OwnsOne(x => x.EntityReference, b =>
        {
            b.Property(x => x.Id).ValueGeneratedNever();
            b.ToJson();
            b.OwnsOne(x => x.AEntityReference, bb =>
            {
                bb.ToJson();
            });
        });

        base.OnModelCreating(modelBuilder, context);
    }

    protected override Task SeedAsync(JsonQueryContext context)
    {
        var jsonEntitiesBasic = JsonQueryData.CreateJsonEntitiesBasic();
        var jsonEntitiesInheritance = JsonQueryData.CreateJsonEntitiesInheritance();
        var jsonEntitiesAllTypes = JsonQueryData.CreateJsonEntitiesAllTypes();
        var jsonEntitiesConverters = JsonQueryData.CreateJsonEntitiesConverters();

        context.JsonEntitiesBasic.AddRange(jsonEntitiesBasic);
        context.JsonEntitiesInheritance.AddRange(jsonEntitiesInheritance);
        context.JsonEntitiesAllTypes.AddRange(jsonEntitiesAllTypes);
        context.JsonEntitiesConverters.AddRange(jsonEntitiesConverters);

        return context.SaveChangesAsync();
    }
}