So I get the concept of ViewModels, in particular the security issue, where you want to restrict the controller capabilities to the reduced set of fields in a ViewModel (as the typical User
model, where the ViewModel has no information about passwords and roles).
Assume a ViewModel deriving from different Models, how would one correctly implement this (keeping e.g. the security thought in mind). Here an image that depicts the issue
I could imagine, that it is better to derive from "Sub-ViewModels" rather than directly from the Models themselves. Is there a best-practice way to do this?