Assume a rather simplistic model:
class Person{
static List<Person> LivingPersons
String Name
List<Person> Dependents
}
From this it can (hopefully) be seen that a single Person object can be both within the LivingPersons list and within the Dependents list of another Person object. Similarly, if there were a couple of ViewModels to represent this model:
class ViewModel_LivingPersons{
static List<ViewModel_Person> LivingPersons
}
class ViewModel_Person{
String Name
List<ViewModel_Person> Dependents
}
If I had a single Person object that resided in both the LivingPersons list and within the Dependents list of another Person, my gut feeling tells me that as it is the same model object being represented there should only ever be one instance of a ViewModel_Person to represent this model object. However, I do not know why, nor if this is best practice.
I'm not certain of the best practices here. I've done a bit of searching, but cannot find anything on this particular issue.