У меня есть 3 класса: дедушка, люди, ребенок
public class GrandFother: BaseObject
{
[Association("GrandFother_Persons")]
//......
public XPCollection<Persons > GFChilds
{
get
{
return GetCollection<Persons >("GFChilds");
}
}
}
public class Persons: BaseObject
{
[Association("Persons_Childs")]
// Other code ...
public XPCollection<Child> Childs
{
get
{
return GetCollection<Child>("Childs");
}
}
//Other code ...
}
public class Child: BaseObject
{
[Association("Persons_Childs")]
// Code ...
}
Теперь я хочу, чтобы в классе GrandFother я хотел получить список всех дочерних элементов, связанных с лицами, принадлежащими дедушке.
Например:
GrangFother1 has two Persons: Person1, Person2.
Person1 has 2 childs: Per1Ch1, Per1Ch2.
Person2 has 2 childs: Per2Ch1, Per2Ch2
Итак, добавьте XPCollection<Child>
к дедушке класса, который будет содержать: Per1Ch1, Per1Ch2, Per2Ch1, Per2Ch2 и, если возможно, с опцией сортировки.
Спасибо.