回退撤销
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
1f4aff2796
commit
2a217c1a20
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue