Backend flow for POST

In this video, we took a tour through the backend to see what happens when a POST request is handled by our CampsController.cs.

There are a few important pieces to remember about POST:

  • The item we send to POST should not have a populated ID field. We let our database do that work for us by automatically assigning our auto-incremented ID.
  • The item returned from POST should include our ID. We are using the CreatedAtAction() to return our newly created Camp with its newly added ID.
 

I finished! On to the next chapter