Showing posts with label PUT. Show all posts
Showing posts with label PUT. Show all posts

Wednesday, August 14, 2019

Creating a PUT (Update) method in Asp.Net Core WebAPI Controller

In this post we will create a HttpPut method in Asp.Net Core WebAPI, which will be used to update a row in the SQL Server database using Entity Framework Core. We have seen how to setup Entity Framework Core in an Asp.Net Core Web API project in the previous posts, in this post we will jump into creating the HttpPut method.

Open the Country controller which we used in the previous post and add the following Update method which uses the HttpPut verb.