You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for soft-deleting entities in repositories so that they can be preserved after the deletion command is issued.
Proposed Solution
Provide the contract ISoftDeletable, that entities will implement to notify the repositories the function is active for the entity repository
When issuing a Remove command to the repository, if the entity is of type ISoftDeletable, update its state without removing it from the underlying data storage
When querying the entities of type ISoftDeletable, an additional filter should be applied to exclude the instances that were soft-deleted
Provide an interface to bypass the soft-delete state, and return even the entities that are marked as deleted (e.g. to run hard-delete processes)
Open Questions
By design, entities might have statuses - should we provide a contract to access those statuses?
If we have a status property of the entity, how can we determine which is the Deleted (or Soft-Deleted) status in the domain context of the entity?
The text was updated successfully, but these errors were encountered:
Add support for soft-deleting entities in repositories so that they can be preserved after the deletion command is issued.
Proposed Solution
ISoftDeletable
, that entities will implement to notify the repositories the function is active for the entity repositoryISoftDeletable
, update its state without removing it from the underlying data storageISoftDeletable
, an additional filter should be applied to exclude the instances that were soft-deletedOpen Questions
The text was updated successfully, but these errors were encountered: