# Models

## Model Binding

* Retrieves data from various sources such as route data, form fields, and query strings.
* Provides the data to controllers and Razor pages in method parameters and public properties.
* Converts string data to .NET types.

Model Binding gets data in the form of key-value pairs from the following sources in an HTTP request:

<table><thead><tr><th width="534"></th><th></th></tr></thead><tbody><tr><td>Form fields</td><td><code>[FromForm]</code></td></tr><tr><td>The request body (for controllers that have the [<code>ApiController]</code> attribute.)</td><td><code>[FromBody]</code></td></tr><tr><td>Route data</td><td><code>[FromRoute]</code></td></tr><tr><td>Query string parameters</td><td><code>[FromQuery]</code></td></tr><tr><td>Uploaded files</td><td>-</td></tr><tr><td>-</td><td><code>[FromHeader]</code></td></tr></tbody></table>
