From b6a898044dbc9053923237c1bff0596d50384d2b Mon Sep 17 00:00:00 2001 From: Isaiah Clifford Opoku Date: Thu, 9 Apr 2026 15:55:10 +0000 Subject: [PATCH] chore: clean up README and code comments for clarity --- README.md | 4 ++-- src/EfCoreKit/Entities/FullEntity.cs | 4 ++-- src/EfCoreKit/Interceptors/SoftDeleteInterceptor.cs | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7dd55b1..442210f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![Build](https://img.shields.io/github/actions/workflow/status/Clifftech123/EfCoreKit/ci.yml?branch=develop&logo=github&label=Build)](https://github.com/Clifftech123/EfCoreKit/actions) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) -**.NET 8 / 9 / 10** · **EF Core 8.x / 9.x / 10.x** · **Works with any EF Core-supported database** +**Works with any EF Core-supported database** @@ -52,7 +52,7 @@ Every .NET project with EF Core ends up writing the same plumbing: soft delete f dotnet add package EfCoreKit ``` -One package — everything is included. No separate installs needed. +One package everything is included. No separate installs needed. --- diff --git a/src/EfCoreKit/Entities/FullEntity.cs b/src/EfCoreKit/Entities/FullEntity.cs index 477e31e..5edb128 100644 --- a/src/EfCoreKit/Entities/FullEntity.cs +++ b/src/EfCoreKit/Entities/FullEntity.cs @@ -1,4 +1,4 @@ -using EfCoreKit.Interfaces; + namespace EfCoreKit.Entities; @@ -11,7 +11,7 @@ public abstract class FullEntity : SoftDeletableEntity, IConcurrency { /// /// Optimistic concurrency token automatically managed by the database. - /// EF Core raises when + /// EF Core raises when /// a stale version is detected during update. /// public byte[] RowVersion { get; set; } = []; diff --git a/src/EfCoreKit/Interceptors/SoftDeleteInterceptor.cs b/src/EfCoreKit/Interceptors/SoftDeleteInterceptor.cs index 94e0265..cd451c7 100644 --- a/src/EfCoreKit/Interceptors/SoftDeleteInterceptor.cs +++ b/src/EfCoreKit/Interceptors/SoftDeleteInterceptor.cs @@ -92,6 +92,8 @@ private void InterceptDeletes(DbContext? context) } } + + private static void CascadeSoftDelete(DbContext context, ISoftDeletable parent, DateTime now, string? userId) { var parentEntry = context.Entry(parent);