soft-delete-restore

Configures soft delete and restore logic for auditable EF Core entities.

1|Updated Feb 28, 2024
One-click install
npx skills add https://github.com/Sparkymod/Template --skill soft-delete-restore-sparkymod
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: soft-delete-restore
Source: https://github.com/Sparkymod/Template/tree/main/.claude/skills/soft-delete-restore
Command: npx skills add https://github.com/Sparkymod/Template --skill soft-delete-restore-sparkymod

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill assists in implementing soft delete capabilities and managing entity deletion in a database context, ensuring auditable data and proper resource handling.

Core Features & Use Cases

  • Soft Delete Implementation: Offers a convention-based approach for soft deleting entities.
  • Restore Functionality: Enables the restoration of deleted entities to their original state.
  • Auditing Support: Provides a foundation for tracking changes, such as deletion events.

Quick Start

Execute the 'soft-delete-restore' Skill to configure soft delete rules for an entity type in your database.

Frequently Asked Questions about soft-delete-restore

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement soft delete in Entity Framework Core?

To implement soft delete in Entity Framework Core, use a convention-based approach with IAuditableEntity and interceptor-based auditing to mark records as deleted without removing them, ensuring data integrity and historical tracking.

What is the best way to restore soft deleted entities while maintaining database auditing?

Restoring soft deleted entities while maintaining database auditing requires conditional reads and interceptor-based tracking to revert deletion flags and log restoration events, ensuring the historical record remains intact.

Does Entity Framework Core support interceptor-based auditing for conditional reads?

Yes, Entity Framework Core supports interceptor-based auditing for conditional reads, allowing you to automatically filter out soft deleted entities during queries and capture deletion or restoration events for auditable entity management.

When do I need conditional reads for soft delete functionality?

You need conditional reads for soft delete functionality when querying a database containing auditable entities, ensuring soft deleted records are automatically excluded from standard query results while remaining available for restoration.

How do I configure soft delete rules for an entity type in my database?

To configure soft delete rules for an entity type in your database, execute the soft delete configuration process to apply convention-based deletion logic, utilizing IAuditableEntity to track and manage the lifecycle of auditable data.