One to one relationship with Entity Framework Fluent API

前端 未结 2 347
無奈伤痛
無奈伤痛 2020-12-17 01:20

I\'m having trouble with reverse navigation on one of my entities.

I have the following two objects:

public class Candidate
{
    [Key, DatabaseGene         


        
2条回答
  •  生来不讨喜
    2020-12-17 01:58

    I think that the foreign key should be created as: .Map(t => t.MapKey("CandidateDataId")) because thsi foreign key will be placed in Candidate table...

    Waht do you think?

提交回复
热议问题