dotnet / eShop

A reference .NET application implementing an eCommerce site
MIT License
6.19k stars 1.82k forks source link

Turn on nullable reference types #20

Open adityamandaleeka opened 1 year ago

adityamandaleeka commented 1 year ago
adityamandaleeka commented 1 year ago

From @bricelam:

I'm adding [Required] to the EF model types to make this work easier. They can be removed once NRTs are enabled.

To state the obvious: Reference-typed properties with [Required] are not nullable. Reference-typed properties without it are nullable--add a ?.