liveBook · Manning

Soft delete

Also called soft deletion

Soft deletion is a technique that marks data as deleted while retaining it in storage rather than immediately removing it physically.

How 3 Manning books explain it

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.

Read how API Design Patterns explains soft delete →

Crack Any Codebase with AI

A soft delete marks a record as deleted while retaining it in the database, typically with a deletion timestamp.

How it is used
Uses soft deletion as a prompt for inspecting hidden schema and query costs before judging production scalability.
How deep it goes
Defines retention-based deletion and flags query, index, and write-cost consequences without detailing implementation mechanics.
Examples
Uses the indexed Booking table and append-only audit log to illustrate read optimization versus write cost.
What you can do after
Diagnose soft-deletion risks by checking exclusion filters, index coverage, and write amplification.

Read how Crack Any Codebase with AI explains soft delete →

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 delete →

Also covered in

What to know first

Related concepts

Questions about soft delete

What is soft delete?

Soft deletion is a technique that marks data as deleted while retaining it in storage rather than immediately removing it physically.

Which Manning books explain soft delete?

API Design Patterns, Crack Any Codebase with AI and ASP.NET Core in Action, 3e.

What should I know before learning soft delete?

Manning books that teach soft delete usually introduce foreign key first.

What is the difference between soft delete and hard delete?

Soft deletion is a technique that marks data as deleted while retaining it in storage rather than immediately removing it physically. A hard delete permanently removes data or a resource from its physical storage rather than merely marking it as deleted.

What is soft delete part of?

Soft delete is part of storage account. A storage account is a top-level Azure resource that provides a namespace, access boundary, and configuration for storage services and their data.

What is soft delete also called?

Soft delete is also called soft deletion.

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.