Soft deletion
Soft deletion is a technique that marks or hides data as deleted while retaining its physical representation for recovery or later permanent removal.
API Design Patterns
Soft deletion is a deletion technique that marks a resource as deleted while retaining it until later physical removal or completion of a deletion process.
- How it is used
- Protects API users from accidental permanent deletion while preserving explicit paths for restoration and final removal.
- How deep it goes
- Defines storage markers, modifies GET, LIST, and DELETE, adds undelete and expunge, and addresses integrity, repetition, expiration, and versioning.
- Examples
- Uses ChatRoom endpoints, includeDeleted listing, undelete, expunge, deleted, and expireTime to demonstrate the resource lifecycle.
- What you can do after
- Operate a soft-deleting resource API with explicit listing, restoration, permanent-removal, expiration, and referential-integrity rules.
ASP.NET Core in Action, 3e
Soft delete is a deletion technique that marks a record as deleted so it is excluded from application exposure while remaining stored.
- How it is used
- Hides deleted records from application and API exposure while preserving their database rows.
- How deep it goes
- Explains the flag, delete method, and retrieval filters, while deferring broader scenario-specific limitations.
- Examples
- Uses a Recipe entity, an IsDeleted property, DeleteRecipe, and Where clauses as working examples.
- What you can do after
- Operate/configure an EF Core service that marks records deleted and prevents ordinary queries from returning them.
Read how ASP.NET Core in Action, 3e explains soft deletion →
Related concepts
- hard deletealternative to · A hard delete permanently removes data or a resource from its physical storage rather than merely marking it as deleted.
- HTTP methodimplemented by · An HTTP method is a standardized operation token in an HTTP request that specifies the intended action on a resource.
- list methodused by · A list method is an API operation that retrieves the resources belonging to a specified collection.
- booleanuses · A Boolean is a logical type or value representing truth or falsity, conventionally with two states: true and false.
- undeleteuses · Undelete is the operation of restoring a resource that was marked as deleted without being physically removed.
- tradeoffcontrasts with · A tradeoff is a situation in which improving one objective or property requires accepting a cost, limitation, or reduction in another.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

