3. Using SQL Server with a connection string
Now that we've seen how Azure Identity integrates with the Azure SDK, we see how we can do it with SQL Server.
As a first step, we create a basic implementation that uses Dapper to get the list of people displayed in the app.
We use Dapper as a first step because we're in control of the lifetime of the SqlConnection
instances, which will make it easier to introduce AAD authentication later.
To get started, I recommend using the updated AzureIdentityLivestream.PeopleGenerator
project:
- The
create-person-table.sql
file allows you to create the table with the expected schema quickly. - Running the generator project will use the
SqlConnectionString
value inappsettings.json
to create rows in the aforementioned table.
Diff from previous tag: 2.blob-storage-with-aad-auth...3.sql-with-connection-string