没有正确的方法来处理不可为 null 的导航属性.
There is no proper way to handle non-nullable navigational properties.
- 文档提出了两种方法,但都不是类型安全的.用一个支持字段并抛出 InvalidOperationException.不清楚如何它不同于什么都不做并且有一个 NullReferenceException
- 用空原谅运算符抑制它
官方文档链接:https://docs.microsoft.com/en-us/ef/core/miscellaneous/nullable-reference-types#non-nullable-properties-and-initialization