Model binding is the process of mapping the Model data coming from the View to the ViewModel parameter of the action method in the Controller.
Let us consider a simple form with a couple of form fields—
EmailID. On the submission of the form, these values would be mapped to the
ViewModel object of the action method of the Controller. Model binding takes care of this mapping. The Model binder looks for a match in the form fields, query strings, and request parameters.
In the preceding example, any class with these properties would be picked up by ModelBinder without any issues.
As the following
Person class contains the
EmailID properties, the model binder would not complain about using this model for mapping the entered ...