Well, you can define an abstract container containing ObjectA:
public class ModelContainer { public ObjectA ObjectA { get; set; } }
and then all your views are inherited from this class and add their own data:
public class SomeViewContainer : ModelContainer { public ObjectB ObjectB { get; set; } }
Then the main page can access the ObjectA property of the model, while individual views can ignore this particular property and access the data that they themselves need.
I canβt say that I especially like this approach. If I could avoid the need for a model on the main page, I would prefer that.
Mark seemann
source share