CRUD Rest API With Azure Function

CRUD Rest API With Azure Function

In the last post we updated the code to use local.settings.json and the Azure Function Application Settings. In this post were going to create three additional REST methods, Create, Update and Delete Person. In addition to this I have also added Route information to each of the methods to add in a version to the end point URL path. additional the original method was called Run, this had to be changed so that we could create multi methods, so i used the end point name for each of the method names.

Get All People

C#

Create Person

With Create, Update and Delete a Json payload will be sent to these methods as a result an async read method will have to be used to read all of the request body, once we have the body it can be deserialized into a person model.

C#

Update Person

C#

Delete Person

C#