Explorar o código

Merge commit 'refs/pull/340/head' of https://gitee.com/zuohuaijun/Admin.NET into next

zuohuaijun %!s(int64=4) %!d(string=hai) anos
pai
achega
04bfbf3b53
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

+ 1 - 1
Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

@@ -148,7 +148,7 @@ public static class SqlSugarSetup
 
 
         // 获取所有实体表
         // 获取所有实体表
         var entityTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass
         var entityTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass
-            && u.IsDefined(typeof(SugarTable), false));
+            && u.IsDefined(typeof(SugarTable), false) && !u.IsDefined(typeof(NotTableAttribute),false));
         if (!entityTypes.Any()) return;
         if (!entityTypes.Any()) return;
         // 初始化库表结构
         // 初始化库表结构
         foreach (var entityType in entityTypes)
         foreach (var entityType in entityTypes)