Skip to content

Commit

Permalink
Merge pull request #12 from czechitas/hires/connectionstring
Browse files Browse the repository at this point in the history
Changed connection string
  • Loading branch information
hiresm authored Oct 23, 2023
2 parents 56198bf + e769ff7 commit e986c25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AutomatedTestingApp/AutomatedTestingApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<DataContext>(options =>
options.UseSqlite(connectionString));
Expand Down

0 comments on commit e986c25

Please sign in to comment.