update db connection
This commit is contained in:
parent
73af43cad6
commit
5be7ad401a
2 changed files with 6 additions and 8 deletions
|
|
@ -62,12 +62,12 @@ ConfigureLogs();
|
|||
builder.Host.UseSerilog();
|
||||
|
||||
// Register DbContext
|
||||
var defaultConnection = builder.Configuration.GetConnectionString("DefaultConnection");
|
||||
var examConnection = builder.Configuration.GetConnectionString("ExamConnection");
|
||||
builder.Services.AddDbContext<ApplicationDbContext>(options =>
|
||||
options.UseMySql(defaultConnection, ServerVersion.AutoDetect(defaultConnection)));
|
||||
var metadataConnection = builder.Configuration.GetConnectionString("MetadataConnection");
|
||||
options.UseMySql(examConnection, ServerVersion.AutoDetect(examConnection)));
|
||||
var defaultConnection = builder.Configuration.GetConnectionString("DefaultConnection");
|
||||
builder.Services.AddDbContext<MetadataDbContext>(options =>
|
||||
options.UseMySql(metadataConnection, ServerVersion.AutoDetect(metadataConnection)));
|
||||
options.UseMySql(defaultConnection, ServerVersion.AutoDetect(defaultConnection)));
|
||||
|
||||
// Add config CORS
|
||||
builder.Services.AddCors(options => options.AddDefaultPolicy(builder =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue