View Model design pattern
The View Model pattern is used when building server-rendered web applications using Razor and can be applied to other technologies. Typically, you access data from a data source and then render a view based on that data. That is where the view model comes into play. Instead of sending the raw data directly to the view, you copy the required data to another class that carries only the required information to render that view, nothing more.
Using this technique, you can even compose a complex view model based on multiple data models, add filtering, sorting, and much more, without altering your data or domain models. Those features are presentation-centric and, as such, the view model responsibility is to meet the view's requirements in terms of presentation of the information, which is in line with the Single Responsibility Principle, which we explored in Chapter 3, Architectural Principles.
We could even see the last example, ActionWithSomeInputAndAModel...