Let's say I have a ConsumerModel . ConsumerModel has many model properties, and one has an AddressModel list. I want this Address property to be loaded lazy, because it is not used everywhere, which is in the ConsumerModel. It is used only in the AddressViewModel , which displays and allows you to change user addresses.
Who takes care of loading AddressModels, ConsumerModel or AddressViewModel ?
Or is there an alternative design that is proposed for this type of thing, for example, disconnecting the Addreses list from the Consumer and treating them as a separate property from the AddressViewModel ?
public class ConsumerModel : IModel { private List<AddressModel> _addresses; public List<AddressModel> Addresses { get; set; } }
source share