Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.84 KB

File metadata and controls

47 lines (33 loc) · 1.84 KB

.Net 8 MVC application with Azure SQL and Dapper

Create an Azure SQL Database

Step 1 If you don't have an Azure subscription, create an Azure free account before you begin.

Step 2 Sign in to the Azure portal with your Azure account.

Step 3 From the Azure portal menu, or from the Home page, select Create a resource image

Step 4 On Azure portal in the Search box, enter SQL Database. From the results list, choose SQL Databases. image

Step 5 On the SQL Database section, choose Create SQL Database. image

Step 6 On the Create SQL Database section provide the following information: image

Set server firewall

image

image

Here we add the current client IP address because we will need this to connect to this database from our local machine.

Create Database Table in Azure SQL

image

Enter the following query in the Query editor pane.

Create table Companies
(
Id int primary key identity(1,1),
CompanyName nvarchar(150),
CompanyAddress nvarchar(250),
Country nvarchar(150),
GlassdoorRating int
)

Get Connection String from Azure SQL Database image

Creating a New Project in Visual Studio image