All the documentation I'm finding on one to one relationships in Entity Framework talk about one side being the dependent and only having a foreign key in one table. How can I tell Entity Framework that both tables have a foreign key to each other. Here is a simple example:
public class TechnicalAdvisor
{
public Guid TechnicalAdvisorId { get; set; }
public Guid ProjectRequestId { get; set; }
public virtual ProjectRequest ProjectRequest { get; set; }
}
public class ProjectRequest
{
public Guid ProjectRequestId { get; set; }
public Guid? TechnicalReviewCompletedById { get; set; }
public virtual TechnicalAdvisor TechnicalReviewCompletedBy { get; set; }
}
The use case is we have a project request that requires technical review. The TechnicalAdvisor table is a whitelist basically for who can do it. Then we need an id for who actually did it. I can't figure out how to tell Entity Framework what this relationship is.