Review schema gestione repository x evitare concorrezza contesto DbContext
This commit is contained in:
+1
-1
@@ -149,7 +149,7 @@ builder.Services.AddSingleton<RedisSubscriptionManager>();
|
||||
|
||||
var connectionString = builder.Configuration.GetConnectionString("Lux.All") ?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found.");
|
||||
// DataLayerContext (manca!)
|
||||
builder.Services.AddDbContext<DataLayerContext>(options =>
|
||||
builder.Services.AddDbContextFactory<DataLayerContext>(options =>
|
||||
{
|
||||
var conn = builder.Configuration.GetConnectionString("Lux.All");
|
||||
options.UseMySql(conn, ServerVersion.AutoDetect(conn), mySqlOptions =>
|
||||
|
||||
Reference in New Issue
Block a user