Azure SQL Database interactions using Azure Functions
So far, you have learned how to store data in Azure Storage services such as Blobs, Queues, and Tables. All these storage services are great for storing non-structured or semi-structured data. However, we might have requirements for storing data in relational database management systems such as Azure SQL Database.
In this recipe, you will learn how to utilize ADO.NET API to connect to the Azure SQL Database and insert JSON data into a table named EmployeeInfo
.
Getting ready
Navigate to the Azure Management portal and create the following:
- Create a logical SQL Server named
AzureCookbook
in the same resource group where you have your Azure Functions. - Create an Azure SQL Database named
Cookbookdatabase
by choosingBlank Database
in theSelect Source
drop-down of theSQL Database
blade while creating the database. - Create a firewall rule to your IP address so that you can connect to the Azure SQL Databases using SQL Server Management Studio (SSMS...