By default, the AbpUserRole
and AbpRole
implement ISoftDelete
. Is it possible to disable it?
I tried to do this:
Answered in this topic: https://forum.aspnetboilerplate.com/viewtopic.php?p=6180#p6193
Data filters work on selecting data. If your entity is SoftDelete, ABP always soft-deletes it and prevents actually deleting.
You can override CancelDeletionForSoftDelete method in your DbContext and prevent cancellation conditionally.
So, like this:
protected override void CancelDeletionForSoftDelete(EntityEntry entry)
{
if (IsSoftDeleteFilterEnabled)
{
base.CancelDeletionForSoftDelete(entry);
}
}