Ver Fonte

修复继承EntityTenant,DataEntityBase的实体类无法附加假删除过滤器

skywolf627 há 4 anos atrás
pai
commit
f5b67bceec
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarSetup.cs

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

@@ -197,7 +197,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.BaseType == typeof(EntityBase));
+            && (u.BaseType == typeof(EntityBase) || u.BaseType == typeof(EntityTenant) || u.BaseType == typeof(DataEntityBase)));
         if (!entityTypes.Any()) return;
         if (!entityTypes.Any()) return;
 
 
         foreach (var entityType in entityTypes)
         foreach (var entityType in entityTypes)