Model binding

The data that is carried with an HTTP request that is mapped to parameters that you define in your method's, signature in a process called Model binding. The HTTP request can contain data inside the various parts that compose it:

  • Route tokens 
  • Query strings
  • Message body
  • Request headers

ASP.NET Core's model binding defines the rules of how to map each value to its correct method parameter.     

We already saw how to bind route tokens to method parameters in the Routing section of this chapter, so we won't repeat ourselves, and will instead concentrate on the other types of bindings.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.204.186