Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Conversation

@pranavkm
Copy link
Contributor

This changeset reintroduces some of the overloads for
Controller.TryUpdateModel.

Fixes #415

This changeset reintroduces some of the overloads for
Controller.TryUpdateModel.

Fixes #415
@kichalla
Copy link
Member

Discussed offline with @pranavkm & @yishaigalatzer ...TryUpdateModel is targeted for non-formatter based scenario and since this helper sits on a controller, the question is if we can provide an experience which is consistent across value providers & formatters (ex: Json formatter) #650

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on ModelName/prefix. Should the property name change, to avoid confusing with overloading the meaning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you're binding, the Model binder first looks for things that start with the ModelName User.Name and then falls back to the prefix-free version:Name. When binding from an action, the parameter \ argument name is the model name by default. When you're using this method, you have to pass it in.

@yishaigalatzer
Copy link
Contributor

:shipit: let's followup on the property name discussion offline.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change this to TryUpdateModelAsync

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants