diff --git a/AutomatedTestingApp/AutomatedTestingApp/Program.cs b/AutomatedTestingApp/AutomatedTestingApp/Program.cs index bb3f0e7..39bef2f 100644 --- a/AutomatedTestingApp/AutomatedTestingApp/Program.cs +++ b/AutomatedTestingApp/AutomatedTestingApp/Program.cs @@ -8,7 +8,7 @@ // Add services to the container. builder.Services.AddControllersWithViews(); -var connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? +var connectionString = Environment.GetEnvironmentVariable("CUSTOMCONNSTR_SQLITE") ?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found."); builder.Services.AddDbContext(options => options.UseSqlite(connectionString));