What problem does it solve?
Ensures consistent and reliable population of audit metadata (CreatedAt, UpdatedAt, CreatedBy, UpdatedBy) across entity saves so developers don't have to set audit fields manually in handlers or services.
Core Features & Use Cases
- IAuditable Interface: Define a minimal contract for entities that require audit fields.
- EF Core SaveChangesInterceptor: Centralized logic to set timestamps and user identifiers on Added and Modified entity states.
- Soft Delete Support: Convert hard deletes into soft deletes via an ISoftDeletable pattern and apply global query filters.
- DI Registration & Configuration: Register interceptor and DbContext wiring to ensure automatic behavior at runtime.
- Detection & Adoption: Simple grep patterns and migration steps to add auditing to an existing codebase.
Quick Start
Add the IAuditable interface to your domain entities and register the AuditableEntityInterceptor so EF Core automatically sets CreatedAt, UpdatedAt, CreatedBy, and UpdatedBy on save.