ViewModelToModel Attribute

Topics: Questions
Dec 10, 2012 at 1:38 PM


The parameter for ViewModelToModel Attribute is the name of the model.

When I add more then one model to a viewmodel I get a warning.

When I want to map Property B from ViewModel to Property A from Model it's not possible.

So is it not much more logical to pass the PropertyName of the property in the model

Dec 12, 2012 at 7:34 PM

The reason for this is that the property name is copied automatically if not provided by the attribute. However, the code cannot determine to which model it maps (although in theory, it should be possible if there is only one model).