Stupid Question time: How to store null in an Entity Framework collection?

The ? symbol for reference types is a compiler annotation for checking and not part of the core type system in .NET.

i.e. Reflection will tell you this property is a ICollection<GuessResult> and the ? won’t affect that, unlike say an int? which will come through as a Nullable<int> rather than an int. The compiler does put a [Nullable(2)] attribute on the property but EF doesn’t read that at this time. I think Non-nullable navigation creates nullable foreign key when principal key is alternate · Issue #30344 · dotnet/efcore · GitHub is the tracking issue.

I think you should be able to configure it as not required using the model builder, e.g.

mb.Entity<GameHistoryEntry>().Property(e => e.Results).IsRequired(false)