The pattern I always see in MVC is to load the domain model (or repository) from the database and then map that into a view model.
I have a question on this pattern - when you have a situation where the view model contains only a few properties out of a large domain model object. And because it's a website which might get high traffic, this seems like it's not the ultimate solution performance-wise, it's like doing SELECT * FROM TABLE
, instead of just selecting the columns required.
The alternative I could think of is that the DAL would return a view model instead of a domain model, but I've never seen such a pettern used before, is this a bad pattern to adopt? Is there any other pattern? Or should I just ignore that overhead of loading a big domain model even though I need only several properties out of it?