In my new UserViewModel that I'm building for my application, I have two options for storing properties.
The first option is to have
Public Property user As User ''# Including the entire User object
Public Property custString as String ''# Custom String for View
The second option is to actually write out all the User properties
Public Property ID As Integer ''# Declaring each object individually
Public Property UserName As String ''# Here is another object found in User
Public Property RegistrationDate As Date ''# Here is another object found in User
Public Property custStrin As String ''# Custom String for View
Can anyone tell me what the better way to do this is and why?
I've currently got the first option, however, I don't like the way it looks in the View in comparison to the second option
This looks nice (IMO)
<%: Model.UserName %>
This does not look as nice (IMO)
<%: Model.User.UserName %>