添加其他数据库
This commit is contained in:
@@ -33,6 +33,26 @@ public static class ConfigureSqlSugarExtensions
|
||||
},
|
||||
});
|
||||
|
||||
foreach (var item in conn.ConfigList)
|
||||
{
|
||||
connectConfigList.Add(new ConnectionConfig
|
||||
{
|
||||
ConnectionString = item.connectionStr,
|
||||
DbType = item.dbType,
|
||||
IsAutoCloseConnection = true,
|
||||
ConfigId = item.ServiceName,
|
||||
InitKeyType = InitKeyType.Attribute,
|
||||
MoreSettings = new ConnMoreSettings()
|
||||
{
|
||||
IsAutoRemoveDataCache = true, // 自动清理缓存
|
||||
IsAutoToUpper = false,
|
||||
//PgSqlIsAutoToLower = false,
|
||||
DisableNvarchar = true
|
||||
},
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
services.AddSqlSugar(connectConfigList, client =>
|
||||
{
|
||||
//connectConfigList.ForEach(config =>
|
||||
|
||||
Reference in New Issue
Block a user