As discussed, model binding maps the data from HTTP requests to action method parameters. These parameters, like any other C# method, can be simple types, such as int, long, decimal, string, or the complex classes. ASP.NET Core MVC has abstracted this logic away from the developers so that they need not worry about this request data to parameter conversion. This conversion is done by the framework in a predefined order. Let's look at how the framework does this. The following is the code map diagram of the model binding subsystem:
Important things to notice in the diagram are:
- ParameterBinder
- ValueProvider factories
- Value providers ...