jeudi 12 janvier 2017

Inherit the Class having list of another class

We are working on customer existing code.The class structure are as below

public class A
{
 public string name;
List<B> AssociatedB;
}

Public class B
{
public string name;
List<C> AssociatedC;
}

Public class C
{
public string name;
}

They asked us not to modify the existing class and its properties.Currently we want to 3 extra properties at each class(A, B, C) for binding on UI.

One way I can think of creating a New ViewModel, have 4 properties(3 new and one property to hold the name property of each class)

But this needs too many looping through each class and bind the properties back to new ViewModel.

Are they any suggestions





Aucun commentaire:

Enregistrer un commentaire