subject 软删除,导致任务列表统计数字问题
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2024-08-12 16:40:20 +08:00
parent 86489b2117
commit 098ade3c8a
2 changed files with 22 additions and 20 deletions

View File

@ -21,6 +21,7 @@ using Microsoft.Identity.Client;
using EntityFramework.Exceptions.Common;
using System.Data;
using IRaCIS.Core.Infrastructure;
using System.Reflection.Metadata;
namespace IRaCIS.Core.Infra.EFCore
{
@ -103,6 +104,7 @@ namespace IRaCIS.Core.Infra.EFCore
modelBuilder.Entity<Dictionary>().HasMany(t => t.ChildList).WithOne(t => t.Parent);
modelBuilder.Entity<SubjectUser>().HasMany(t => t.EarlierSubjectUserList).WithOne(t => t.OrignalSubjectUser);
modelBuilder.Entity<VisitTask>().HasQueryFilter(b => b.Subject.IsDeleted == false);
//遍历实体模型手动配置
var typesToRegister = Assembly.GetExecutingAssembly().GetTypes().Where(q => q.GetInterface(typeof(IEntityTypeConfiguration<>).FullName) != null);