后台数据表建立
This commit is contained in:
@@ -19,12 +19,10 @@ namespace Ewide.EntityFramework.Core
|
||||
options.CustomizeMultiTenants(); // 自定义租户
|
||||
|
||||
options.AddDb<DefaultDbContext>();
|
||||
options.AddDb<MultiTenantDbContext, MultiTenantDbContextLocator>();
|
||||
//options.AddDb<MultiTenantDbContext, MultiTenantDbContextLocator>();
|
||||
}, "Ewide.Database.Migrations");
|
||||
var connList = App.GetConfig<List<MutiDBConnectionString>>("ConnectionStrings")?.Where(p => p.Enabled).ToList();
|
||||
// 注册dapper, 目前只能强行写死连接字符串和数据库程序集
|
||||
services.AddDapper(connList.Find(a => a.Id == "118_3310_ewide")?.ConnectionString, SqlProvider.MySql);
|
||||
|
||||
// 注册dapper, 目前只能强行写死连接字符串和数据库程序集
|
||||
services.AddDapper(App.Configuration["DefaultConnection"], SqlProvider.MySql);
|
||||
//sqlsugar的注册代码放到了SqlSugar文件夹里
|
||||
services.AddSqlsugarSetup();
|
||||
//List<ConnectionConfig> connectConfigList = new()
|
||||
|
||||
Reference in New Issue
Block a user