Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
Update Program.cs (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminsampica authored Nov 15, 2022
1 parent e2adc04 commit 9f1fe31
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@
connectionString = await MsSqlContainerFactory.CreateAsync();
}

builder.Services.AddDbContext<ApplicationDbContext>(options =>
builder.Services.AddDbContextFactory<ApplicationDbContext>(options =>
{
options.UseSqlServer(connectionString);
options.UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
options.EnableSensitiveDataLogging();
});
builder.Services.AddDbContextFactory<ApplicationDbContext>(lifetime: ServiceLifetime.Scoped);
}, ServiceLifetime.Scoped);

builder.Services.AddDefaultIdentity<ApplicationUser>(options =>
{
Expand Down

0 comments on commit 9f1fe31

Please sign in to comment.