diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 92a54bfcc..3f06bddc0 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -174,6 +174,7 @@ public class IRaCISDBContext : DbContext if (navigation.IsCollection) continue; + #region 有问题 // 配置基于导航属性的软删除查询筛选器 if (typeof(ISoftDelete).IsAssignableFrom(navigation.TargetEntityType.ClrType)) { @@ -191,8 +192,12 @@ public class IRaCISDBContext : DbContext modelBuilder.Entity(clrType).HasQueryFilter(filterNav); - //Console.WriteLine($"实体应用软删除:{entityType.ClrType.Name} 导航属性{filterNav}"); + Console.WriteLine($"实体应用软删除:{entityType.ClrType.Name} 导航属性{filterNav}"); } + + #endregion + + } if (typeof(Entity).IsAssignableFrom(entityType.ClrType)) diff --git a/IRaCIS.Core.Infra.EFCore/EntityConfigration/VisitTaskConfigration.cs b/IRaCIS.Core.Infra.EFCore/EntityConfigration/VisitTaskConfigration.cs index c3d486497..c592a9fbb 100644 --- a/IRaCIS.Core.Infra.EFCore/EntityConfigration/VisitTaskConfigration.cs +++ b/IRaCIS.Core.Infra.EFCore/EntityConfigration/VisitTaskConfigration.cs @@ -21,7 +21,7 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration //对于全局修改的任务而言,会关联多个全局访视阅片结果(因为同一个访视结果,会被多个全局修改) //subject 删除了,但是任务没删除,导致的查询问题 - //builder.HasQueryFilter(b => b.Subject.IsDeleted == false); + builder.HasQueryFilter(b => b.Subject.IsDeleted == false); } }