Updating the Code to Store in Microsoft Azure SQL Database
Understand how to update your C# API to save image description data in a Microsoft Azure SQL Database. Learn to add necessary SQL Client references, modify functions to handle database writes, and test your API with Postman to verify data storage. This lesson helps you integrate Azure SQL with your Azure Functions API for effective data management.
We'll cover the following...
We'll cover the following...
Preparing the code
Now that we’ve created our database and table where we’ll store the data, it’s time to modify our API to store the image description data in the database.
- First, we need to add a project reference to the SQL Client to enable us to interact with the Azure SQL server from our code. In the
.csprojfile, we will add the following package reference:
We will add a new function to ...