问题修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
07dcb6fe47
commit
4966a32bcb
|
@ -69,7 +69,20 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
typeof(TrialSiteSurvey),
|
typeof(TrialSiteSurvey),
|
||||||
typeof(TrialSiteUser),
|
typeof(TrialSiteUser),
|
||||||
typeof(VisitStage),
|
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;
|
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 ||
|
else if (entityEntry.State == EntityState.Deleted ||
|
||||||
(entityEntry.State == EntityState.Modified
|
(entityEntry.State == EntityState.Modified
|
||||||
|
|
Loading…
Reference in New Issue