fixed errors while logging raids
SQlite is now also used in production
This commit is contained in:
parent
7d6bc48dba
commit
fc5e75cc9d
5 changed files with 12 additions and 20 deletions
|
@ -9,14 +9,8 @@ var builder = WebApplication.CreateBuilder(args);
|
|||
// Add services to the container.
|
||||
builder.Services.AddRazorPages();
|
||||
|
||||
#if DEBUG
|
||||
builder.Services.AddDbContextFactory<LiebContext>(opt =>
|
||||
//opt.UseSqlServer(builder.Configuration.GetConnectionString("LiebContext")).EnableSensitiveDataLogging(), ServiceLifetime.Transient);
|
||||
opt.UseSqlite(builder.Configuration.GetConnectionString("LiebContext")));
|
||||
#else
|
||||
builder.Services.AddDbContextFactory<LiebContext>(opt =>
|
||||
opt.UseMySql(builder.Configuration.GetConnectionString("LiebContext"), ServerVersion.AutoDetect(builder.Configuration.GetConnectionString("LiebContext"))), ServiceLifetime.Transient);
|
||||
#endif
|
||||
|
||||
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue