Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
If a controller action method has parameters, Web API must provide values for those parameters using a process known as "parameter binding".
Follow Along
To follow along committing your changes to this course, you'll need to fork the aspnet-fitness-frog-spa repo. Then you can clone, commit, and push your changes to your fork like this:
git clone <your-fork>
cd aspnet-fitness-frog-spa
git checkout tags/v2.4 -b exploring-parameter-binding
JSON POST Data
If you're following along, here's the message body data for making a POST request against the API:
{
"date": "1/1/2017",
"activityId": 1,
"duration": 4.5,
"intensity": 1,
"exclude": false,
"notes": null
}
Advanced Parameter Binding Options
For more information about the advanced parameter binding options available in Web APIβincluding type converters, model binders, value providers, and custom parameter binding rulesβsee this resource:
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up