This commit is contained in:
@@ -25,15 +25,7 @@ namespace Dilon.EntityFramework.Core
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseMySql(
|
||||
GetDatabaseConnectionString(),
|
||||
ServerVersion.FromString("5.5.53-mysql"),
|
||||
p => p.EnableRetryOnFailure(
|
||||
maxRetryCount: 5,
|
||||
maxRetryDelay: TimeSpan.FromSeconds(30),
|
||||
errorNumbersToAdd: new int[] { 2 }
|
||||
)
|
||||
);
|
||||
optionsBuilder.UseMySql(GetDatabaseConnectionString(), ServerVersion.FromString("5.5.53"));
|
||||
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Dilon.EntityFramework.Core
|
||||
options.CustomizeMultiTenants(); // 自定义租户
|
||||
|
||||
options.AddDb<DefaultDbContext>();
|
||||
options.AddDb<MultiTenantDbContext, MultiTenantDbContextLocator>();
|
||||
options.AddDb<MultiTenantDbContext>();
|
||||
}, "Dilon.Database.Migrations");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user