Let us first try to understand what the interviewer is asking. When we bind a model with a view we use the model dropdown as shown in the below figure. In the below figure we can only select one model.
But what if we want to bind “Customer” as well as “Order” class to the view.
For that we need to create a view model which aggregates both the classes as shown in the below code. And then bind that view model with the view.
In the view we can refer both the model using the view model as shown in the below code.
One of the most popular MVC interview question is what is difference between view data, temp data and view bag. Below is a video from questpond.com which explains the same in detail.