Reputation: 10850
Does excludeProperties
parameter in http://msdn.microsoft.com/en-us/library/dd492957.aspx exclude properties from the model or the values from the Request?
E.g.
If I wish to exclude Model.SomeProperty.SomeChildProperty
which has a name attribute of "Model.SomeProperty.SomeChildProperty", should I pass
["SomeProperty"]
(name of the property on the model)
or
["Model.SomeProperty.SomeChildProperty"]
(name of the field in the Request form)
To exclude it from the udpate?
Upvotes: 0
Views: 329
Reputation: 53183
The DefaultModelBinder
will look at PropertyDescriptor.Name
when filtering properties during model binding. You should use the model property name.
Upvotes: 2