EF Core 2.0.0 One to One-or-Zero with Fluent Api

后端 未结 1 658
被撕碎了的回忆
被撕碎了的回忆 2021-01-19 15:04

In Fluent Api at EF Core 2.0.0, there aren\'t any methods HasRequired and HasOptional, and i have tow Models, Person and

相关标签:
1条回答
  • 2021-01-19 15:46

    You could just specify int? as EmployeeId property type.

    BTW, no need to make navigation properties virtual.

    0 讨论(0)
提交回复
热议问题