79477252

Date: 2025-03-01 07:51:30
Score: 1.5
Natty:
Report link

I also faced this problem last week. I use .NET 8 and EntityFrameworkCore 8. After re-reading the official document. I found that it's related to the NRT feature. Here is the document if someone needed.

Official Doc

If nullable reference types are disabled, all properties with .NET reference types are configured as optional by convention (for example, string).

If nullable reference types are enabled, properties will be configured based on the C# nullability of their .NET type: string? will be configured as optional, but string will be configured as required.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: GiangMH