I have a class called Person
public class Contact
{
public int ID{get;set;}
public string Name{get; set;}
public Contact Secretary{get; set;}
public Contact Assistant{get; set;}
}
When I try to do data migrations I get the following error.
Unable to determine the principal end of an association between the types
'MyApp.Contact' and 'MyApp.Contact'. The principal end of this association must be
explicitly configured using either the relationship fluent API or data annotations.
If I remove one of the two "Contact" types the error goes away. How do I have two contact types in the class? I would like to work thru this error using Data Annotations if possible. But am not sure where to start with this one.