With MVVM, I think of a view-model as a class that provides all the data and commands that a view needs to bind to.
But what happens when I have a database entity object, say a Customer
, and I want to build a class that shapes or flattens the Customer class for use in a data grid. For example, maybe this special Customer object would have a property TotalOrders
, which is actually calculated using a join with a collection of Order
entities.
My question is, what do I call this special Customer
class? In other situations, I'd be tempted to call it a CustomerViewModel
, but I feel like "overloading" the notion of a view-model like this would be confusing in an MVVM project. What would you suggest?