using Microsoft.AspNetCore.Mvc;
using Microsoft.Data.SqlClient;

public class DBConnectionController : Controller
{
    protected SqlConnection GetConnection()
    {
        var connectionString = AppSettings.GetConnectionString("DefaultConnection");
        var connection = new SqlConnection(connectionString);
        connection.Open();
        return connection;
    }
}
