Replies: 1 comment
-
Yes, this is a great idea and something that is definitely in scope for PlatformPlatform. I would love to do this using Entity Framework query filters so deleted entities are not included by default when querying. I already use this for tenant isolation, which might cause some challenges, as one cannot disable only some query filters afaik. So, if we want to query deleted entities, then one has to manually add the general tenant filter, which is not ideal. I already have this idea as a “Someday maybe” Roadmap item. I’m trying to get my list of issues down to what I consider to be in version 1.0, so I converted this to a discussion. It’s not a big thing, so maybe I will suddenly just make it. |
Beta Was this translation helpful? Give feedback.
-
Contact Details
No response
Detailed description?
Is your feature request related to a problem? Please describe.
Part of supporting entities requiring a strong audit trail is protecting against deletion
(Feel free to close if out of scope for PlatformPlatform ❤️)
Describe the solution you'd like
We are currently using an interface to mark entities
ISoftDeletedEntity
and lettingRepositoryBase
check if Remove should do a hard or soft delete.Describe alternatives you've considered
This solution was suggested by a "friend" but there might be better alternatives?
Additional context
SharedKernel/Domain/ISoftDeletedEntity.cs
SharedKernel/Persistence/RepositoryBase.cs
Usage:
Feature Type
.NET
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions