Every time I look at an MVC action method, I find a new feature.
- First, it seems to pull in route parameters automatically into matching parameter names (e.g. "id"), along with form fields, query strings, and cookies.
- Then I discover that if you include the strongly-typed ViewModel as a parameter, it automatically populates its members from form fields/controls.
- Now, I see in Microsoft's scaffolding for a new controller with read/write, it sticks a FormCollection parameter on post actions that presumably is automatically populated with form field values (e.g. the precursor to a strongly-typed model?)
What other magic happens with action method parameters?
The last one in particular surprised me, because it's not mentioned anywhere in the documentation, such as under "Automatically Mapping Action-Method Parameters" here: https://msdn.microsoft.com/en-us/library/dd410269%28v=vs.100%29.aspx