I'm playing and Learning EntityFramework 7 RC1.
I have
public class Person
{
public long PersonId{get;set;}
public ICollection<Relation> Friends {get;set;}
public ICollection<Group> Groups{get;set;} //Works if commented
}
public class Relation
{
public long RelationId { get; set; }
public long PersonId { get; set; }
public Person FriendWith { get; set; }
public ICollection<RelationType> Status { get; set; }
}
public class Group
{
public long GroupId { get; set; }
public long PersonId { get; set; }
public string Name { get; set; }
public ICollection<Person> Friends { get; set; }
}
Everything works in my model but not the last property of the Group class.
What i want is that a person can have Friends(Person) and can group his friends in groups (coworkers, friends...). The top would be to have the possibility to query a Person and get : - Person.Friends - Person.Groups - Person.Groups.FirstOrDefault().Friends
Thank you very for your help.