What kind of data belongs in a view model?
- by Byron Sommardahl
The name "view model" suggests that it models the data for the view. That much is obvious. What else can or should go in the view model?
As an example, a view might display a list of items in a shopping cart, fields for customer's credit card info, and fields for customer's billing information. The view model might contain properties for all that OR it might only contain properties for the shopping cart items.