C# Entity Framework Basics Extending Our Entity Data Model Defining a Foreign Key Property

Balazs Pukli
Balazs Pukli
46,030 Points

just added [Required] annotation, as you have said in one of the previous videos, and that also made it non-nullable

just added [Required] annotation, as you have said in one of the previous videos, and that also made it non-nullable

1 Answer

Steven Parker
Steven Parker
167,902 Points

That's right, since a "null" indicates that no answer was provided. So any field that is required is also not nullable.