I have a class that have a relationship with itself:
public class Person
{
public long ID { get; set; }
public string Name { get; set; }
public virtual Person Mother { get; set; }
public virtual Person Father { get; set; }
}
When EF 4.1 is trying to map this class I'm getting the follow error: 'Unable to determine the principal end of an association between the types 'Model.Person' and 'Model.person'. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.'
I already tried the solution of the topic EF 4.1 - Model Relationships without success.
How I can fix that?
Thanks!