How do you handle situations where you have Model classes based on SQL tables, for instance when using Entity Framework to generate the Entities and data access for you but you would still like one or two properties to be different and/or excluded.
I have no problem having separate View Model classes and Model classes but there’s more and more occasions where differences are only minor. So I end up copying Model class properties to the View model class and change/remove the property I want.
So, in a sense I would like to follow the pattern of separate Model and View Model classes but it’s often time consuming just to achieve the removal of dependency between Views and Models – I could just use the Model class in the View.
You could simply make your ViewModel a subclass of your Model. As needed, you could refactor your ViewModels and even remove its inheritance from your Model.
You are right to anticipate the potential downsides of passing domain models to your view, but there’s no rule against keeping things simple if it works for you.