--- title: "Release Notes v0.5.0" description: "Release notes for RoomSharp 0.5.0 Smart Entity Lifecycle." canonical: "https://roomsharp.dev/docs/v0.5.4/release-notes-0-5-0" source: "src/content/v0.5.4/release-notes-0-5-0.mdx" --- # RoomSharp 0.5.0 - Smart Entity Lifecycle ## New Features ### Soft Delete DAO Methods Entities marked with `[SoftDelete]` now get generated lifecycle methods directly inside their DAO implementations: ```csharp await customerDao.RestoreAsync(customer); customerDao.Restore(customer); await customerDao.HardDeleteAsync(customer); customerDao.HardDelete(customer); ``` This removes the need for database extension methods and makes soft-delete lifecycle operations compatible with Dependency Injection. ### Automatic Soft Delete Query Filtering `[Query]` methods targeting `[SoftDelete]` entities automatically exclude deleted rows by default: - Timestamp soft delete: `deleted_at IS NULL` - Bool soft delete: `is_deleted = 0` ### Automatic Decryption Properties marked with `[Encrypted]` are automatically decrypted after SELECT queries. This applies to: - Single-entity results. - Collection results. - Serialized concurrency mode. - Parallel concurrency mode. Manual `Decrypt()` calls are no longer required for generated DAO SELECT paths. ### Auditable Entities Entities marked with `[Auditable]` automatically populate audit fields: - `CreatedAt` on insert. - `UpdatedAt` on insert/update. - `CreatedBy` when tracking is enabled and `IAuditContext` is available. ## Compatibility - `QueryCache.InvalidateByPrefix()` now returns the invalidated entry count for QueryExtensions cache integration. - Generated auditable code now integrates with `IAuditContext.GetCurrentUser()`. The 0.5 lifecycle features are source-generator features. Rebuild the consuming project after updating packages so generated DAO code is refreshed. ## Related - [DAO Interfaces](/docs/v0.5.4/dao-interfaces) - [Generated Code](/docs/v0.5.4/generated-code) - [Changelog](/docs/v0.5.4/changelog)