For developers, connecting to a SQL database in Azure works exactly the same as connecting to an on-premises SQL Server instance. We can use good old ADO.NET or Entity Framework for this. The following two examples assume you've created the Person table and inserted some data, as described in the previous section.
Connecting to Azure SQL from .NET Core
Connecting using ADO.NET
Let's make a connection and print our data using ADO.NET. Create a new .NET Core console application using Visual Studio 2017. In .NET Core, it's necessary to install the System.Data.SqlClient package using NuGet. This package contains the necessary classes, such as SqlConnection and SqlCommand, which have been around since the...