The goal with this project is to show how to connect to a database and perform some simple CRUD operations on a SQL Azure instance using Managed Identities.
Installed the following nuget packages:
[Microsoft.Data.SqlCLient] (https://www.nuget.org/packages/Microsoft.Data.SqlClient)
-
Create a SQL Azure instance and a database.
-
Creae the following table:
CREATE TABLE [dbo].[Cities]([Id] [int] NOT NULL, [City] [varchar](50) NULL, [Population] [int] NULL, CONSTRAINT [PK_Cities] PRIMARY KEY CLUSTERED ([Id] ASC)
-
Update the code in the Program.cs file with the connection string to your SQL Azure instance.
-
Run the code.