瀏覽代碼

获取数据库表集合时过滤ConfigId时==调整

liteap 2 年之前
父節點
當前提交
a11b7e8391
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs

+ 1 - 1
Admin.NET/Admin.NET.Core/Service/CodeGen/SysCodeGenService.cs

@@ -137,7 +137,7 @@ public class SysCodeGenService : IDynamicApiController, ITransient
         var provider = _db.AsTenant().GetConnectionScope(configId);
         var dbTableInfos = provider.DbMaintenance.GetTableInfoList(false); // 不能走缓存,否则切库不起作用
 
-        var config = App.GetOptions<DbConnectionOptions>().ConnectionConfigs.FirstOrDefault(u => u.ConfigId == configId);
+        var config = App.GetOptions<DbConnectionOptions>().ConnectionConfigs.FirstOrDefault(u => configId.Equals(u.ConfigId));
 
         var dbTableNames = dbTableInfos.Select(u => u.Name.ToLower()).ToList();
         IEnumerable<EntityInfo> entityInfos = await GetEntityInfos();