-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templates
Milestone
Description
The current implementation does not re-initialize a record type model if it's not-null. This means constructor parameters will remain unchanged, but properties will get updated. This might be surprising to users. Here are the interesting scenarios to think about:
Scenario 1: Updating a record type model
var recordTypeModel = new RecordTypeModel("initial-value") { Property1 = "Value1" };
TryUpdateModel(recordTypeModel);Scenario 1: Updating a record type model that's a property
var container = new ContainerModel { RecordType = new RecordTypeModel("initial-value") { Property1 = "Value1" } };
TryUpdateModel(container);Metadata
Metadata
Assignees
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templates