changed to Pomelo.EntityFrameworkCore.MySql for release version

This commit is contained in:
t.ruspekhofer 2022-02-27 20:07:57 +01:00
parent f9ad0ee515
commit 8137b1ca6a
5 changed files with 20 additions and 3 deletions

View file

@ -13,7 +13,7 @@ builder.Services.AddDbContextFactory<LiebContext>(opt =>
opt.UseSqlServer(builder.Configuration.GetConnectionString("LiebContext")).EnableSensitiveDataLogging(), ServiceLifetime.Transient);
#else
builder.Services.AddDbContextFactory<LiebContext>(opt =>
opt.UseSqlServer(builder.Configuration.GetConnectionString("LiebContext")), ServiceLifetime.Transient);
opt.UseMySql(builder.Configuration.GetConnectionString("LiebContext"), ServerVersion.AutoDetect(builder.Configuration.GetConnectionString("LiebContext"))), ServiceLifetime.Transient);
#endif
builder.Services.AddDatabaseDeveloperPageExceptionFilter();