修改数据库配置
This commit is contained in:
@@ -135,21 +135,19 @@ namespace ZR.Admin.WebApi
|
|||||||
int dbType = Convert.ToInt32(Configuration[OptionsSetting.ConnDbType]);
|
int dbType = Convert.ToInt32(Configuration[OptionsSetting.ConnDbType]);
|
||||||
int dbType_bus = Convert.ToInt32(Configuration[OptionsSetting.ConnBusDbType]);
|
int dbType_bus = Convert.ToInt32(Configuration[OptionsSetting.ConnBusDbType]);
|
||||||
|
|
||||||
IocConfig db1 = new IocConfig()
|
SugarIocServices.AddSqlSugar(new List<IocConfig>() {
|
||||||
{
|
new IocConfig() {
|
||||||
ConfigId = "0", //<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
ConfigId = "0", //<2F><><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
||||||
ConnectionString = connStr,
|
ConnectionString = connStr,
|
||||||
DbType = (IocDbType)dbType,
|
DbType = (IocDbType)dbType,
|
||||||
IsAutoCloseConnection = true//<2F>Զ<EFBFBD><D4B6>ͷ<EFBFBD>
|
IsAutoCloseConnection = true//<2F>Զ<EFBFBD><D4B6>ͷ<EFBFBD>
|
||||||
};
|
}, new IocConfig() {
|
||||||
IocConfig db2 = new IocConfig()
|
|
||||||
{
|
|
||||||
ConfigId = "1", // <20><><EFBFBD>⻧<EFBFBD>õ<EFBFBD>
|
ConfigId = "1", // <20><><EFBFBD>⻧<EFBFBD>õ<EFBFBD>
|
||||||
ConnectionString = connStrBus,
|
ConnectionString = connStrBus,
|
||||||
DbType = (IocDbType)dbType_bus,
|
DbType = (IocDbType)dbType_bus,
|
||||||
IsAutoCloseConnection = true//<2F>Զ<EFBFBD><D4B6>ͷ<EFBFBD>
|
IsAutoCloseConnection = true//<2F>Զ<EFBFBD><D4B6>ͷ<EFBFBD>
|
||||||
};
|
}
|
||||||
SugarIocServices.AddSqlSugar(new List<IocConfig>() { db1, db2 });
|
});
|
||||||
|
|
||||||
//<2F><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡSQL
|
//<2F><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӡSQL
|
||||||
DbScoped.SugarScope.GetConnection(0).Aop.OnLogExecuting = (sql, pars) =>
|
DbScoped.SugarScope.GetConnection(0).Aop.OnLogExecuting = (sql, pars) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user