One of the major prerequisites for this article is that we should have a Dotnet Project and SQL Server 18.0 or greater than that. Basically our task is to shift the database in Azure and connect it with the .NET Application. For that, we have to go through step-by-step:
Create a SQL Server -> Deploy the database -> Connect with Dotnet Application.
First, we need an activated Azure account. Once we have that, we just need to create an SQL Server in Azure.
Make sure to fill in the following information carefully.
- Server name – the name of your new SQL Server.
- Server admin login – your server admin user name.
- Password – Use a password that you can remember.
- Subscription – select an existing Microsoft Azure subscription that you have access to.
- Resource group – select an existing resource group or create a new one. For more information on resource groups, you can refer to the Microsoft documentation on Resource groups.
- Location – pick any location of your choice.
Note: Make sure you add a firewall rule to the created SQL Server.
Once you are done filling in the above information, then from the SQL Server Management Studio we need to deploy our database to our created SQL server.
Finally, the last step is to get the connection string from Azure and paste that in our Project's Web Config file. Once we pasted that connection string, the project starts to query data from Azure.
We have now completed all our tasks.
For a more detailed description, you can visit here.