I have these two classes:
Code:
public class Parent
{
public virtual string Name { get; set; }
public virtual string Family_id { get; set; }
public virtual IEnumerable<Children> Childrens { get; set; }
}
public class Children
{
public virtual string Name { get; set; }
public virtual DateTime BirthDate { get; set; }
public virtual string Family_id { get; set; }
}
When I fetch a parent, I also want to fetch the childrens that has the same Family_id. Family_id is not a foreign key though, so I'm guessing I need to do some kind of join. How can I set up my mappings to accomplish this?