diff --git a/crates/cli/src/subcommands/generate/csharp.rs b/crates/cli/src/subcommands/generate/csharp.rs index 8913bb6b52..f9995d0388 100644 --- a/crates/cli/src/subcommands/generate/csharp.rs +++ b/crates/cli/src/subcommands/generate/csharp.rs @@ -589,6 +589,11 @@ fn autogen_csharp_product_table_common( writeln!(output, "{{").unwrap(); { indent_scope!(output); + writeln!( + output, + "[Newtonsoft.Json.JsonObject(Newtonsoft.Json.MemberSerialization.OptIn)]" + ) + .unwrap(); writeln!(output, "public partial class {name} : IDatabaseTable").unwrap(); writeln!(output, "{{").unwrap(); {