zuohuaijun 2 лет назад
Родитель
Сommit
39cdc417ec
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarRepository.cs

+ 3 - 3
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarRepository.cs

@@ -11,13 +11,13 @@ namespace Admin.NET.Core;
 public class SqlSugarRepository<T> : SimpleClient<T> where T : class, new()
 {
     protected static ITenant ITenant { get; set; }
-    protected static SqlSugarScopeProvider MasterDb { get; set; }
+    protected static SqlSugarScopeProvider MainDb { get; set; }
 
     public SqlSugarRepository()
     {
         ITenant ??= App.GetRequiredService<ISqlSugarClient>().AsTenant();
-        MasterDb ??= ITenant.GetConnectionScope(SqlSugarConst.MainConfigId);
-        base.Context = MasterDb;
+        MainDb ??= ITenant.GetConnectionScope(SqlSugarConst.MainConfigId);
+        base.Context = MainDb;
 
         // 若实体贴有多库特性,则返回指定库连接
         if (typeof(T).IsDefined(typeof(TenantAttribute), false))