问题修改
continuous-integration/drone/push Build is passing Details

Uat_Study^2
he 2024-05-27 15:07:46 +08:00
parent 07dcb6fe47
commit 4966a32bcb
2 changed files with 26 additions and 4 deletions

View File

@ -69,7 +69,20 @@ namespace IRaCIS.Core.Infra.EFCore.Common
typeof(TrialSiteSurvey),
typeof(TrialSiteUser),
typeof(VisitStage),
typeof(TrialSite)
typeof(TrialSite),
};
}
}
// 修改为删除
private List<Type> UpdateIsDelete
{
get
{
return new List<Type>()
{
typeof(TrialDocument)
};
}
}
@ -81,6 +94,15 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{
return AuditOpt.Add;
}
else if (
UpdateIsDelete.Contains(entityEntry.Entity.GetType())
&& entityEntry.State == EntityState.Modified
&& (bool)entityEntry.Entity.GetType().GetProperty(nameof(ISoftDelete.IsDeleted)).GetValue(entityEntry.Entity)
)
{
return AuditOpt.Deleted;
}
else if (entityEntry.State == EntityState.Deleted ||
(entityEntry.State == EntityState.Modified