let's say I have a view where I currently only use model information from my User class.
Should I create an additional viewmodel shell or directly return an instance of the user class to the view?
Directly returned object:
return View(user);
Wrapped in a ViewModel object:
return View(new UserViewModel(user));
I am looking for the best practice here. Perhaps I need to return to watching later, but I do not know this yet. Could this be an argument to always use the optional ViewModel class?
Thank you for your help!
source share