From a5851a4e906725b868bcfdaa8c59249523137586 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 29 十月 2024 14:03:47 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/baifenbaishop

---
 CoreCms.Net.Core/Config/SqlSugarSetup.cs |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/CoreCms.Net.Core/Config/SqlSugarSetup.cs b/CoreCms.Net.Core/Config/SqlSugarSetup.cs
index 147521e..fa42781 100644
--- a/CoreCms.Net.Core/Config/SqlSugarSetup.cs
+++ b/CoreCms.Net.Core/Config/SqlSugarSetup.cs
@@ -1,6 +1,6 @@
 锘�/***********************************************************************
- *            Project: CoreCms.Net                                     *
- *                Web: https://CoreCms.Net                             *
+ *            Project: baifenBinfa.Net                                     *
+ *                Web: https://baifenBinfa.com                             *
  *        ProjectName: 鐧惧垎鍏垫硶绠$悊绯荤粺                               *
  *             Author:                                        *
  *              Email:                               *
@@ -12,6 +12,7 @@
 
 
 using System;
+using System.Collections.Generic;
 using CoreCms.Net.Caching.SqlSugar;
 using CoreCms.Net.Configuration;
 using CoreCms.Net.Loging;
@@ -32,16 +33,34 @@
             if (services == null) throw new ArgumentNullException(nameof(services));
 
             //娉ㄥ叆 ORM
-            SugarIocServices.AddSqlSugar(new IocConfig()
+            //SugarIocServices.AddSqlSugar(new IocConfig()
+            //{
+            //    //鏁版嵁搴撹繛鎺�
+            //    ConnectionString = AppSettingsConstVars.DbSqlConnection,
+            //    //鍒ゆ柇鏁版嵁搴撶被鍨�
+            //    DbType = AppSettingsConstVars.DbDbType == IocDbType.MySql.ToString() ? IocDbType.MySql : IocDbType.SqlServer,
+            //    //鏄惁寮�鍚嚜鍔ㄥ叧闂暟鎹簱杩炴帴
+            //    IsAutoCloseConnection = true
+            //});
+            SugarIocServices.AddSqlSugar(new List<IocConfig>
             {
-                //鏁版嵁搴撹繛鎺�
+               new   IocConfig{//鏁版嵁搴撹繛鎺�
                 ConnectionString = AppSettingsConstVars.DbSqlConnection,
                 //鍒ゆ柇鏁版嵁搴撶被鍨�
                 DbType = AppSettingsConstVars.DbDbType == IocDbType.MySql.ToString() ? IocDbType.MySql : IocDbType.SqlServer,
                 //鏄惁寮�鍚嚜鍔ㄥ叧闂暟鎹簱杩炴帴
                 IsAutoCloseConnection = true
-            });
+                },
+               new IocConfig
+               {
+                    ConfigId=AppSettingsConstVars.CYDbDbID,
+                    ConnectionString=AppSettingsConstVars.CyDbSqlConnection,
+                       DbType = AppSettingsConstVars.CyDbDbType == IocDbType.MySql.ToString() ? IocDbType.MySql : IocDbType.SqlServer,
+                       //鏄惁寮�鍚嚜鍔ㄥ叧闂暟鎹簱杩炴帴
+                IsAutoCloseConnection = true
+               }
 
+            });
             //璁剧疆鍙傛暟
             services.ConfigurationSugar(db =>
             {

--
Gitblit v1.9.1