π‘.π‘ππ§ π§πΆπ½ - ππ’π₯π‘ππ’ππ£π©ππ£π ππ€ππ© πΏππ‘ππ©π ππ£ ππ πΎπ€π§π
Soft delete looks simple on paper.
Until you hit production.
Then you start seeing:
πΈ Deleted records showing up in queries
πΈ Audit trails that make no sense
πΈ Bulk operations skipping your delete logic entirely
πΈ Raw SQL ignoring your global filters
I've seen teams spend days debugging issues that came from a poorly implemented soft delete.
So I wrote a practical guide on doing it properly in EF Core.
π What it covers:
πΈ Global query filters β EF Core hides deleted rows automatically
πΈ Interceptors vs SaveChanges override β when to use which
πΈ IgnoreQueryFilters() β for admin views and restore logic
πΈ Filtered indexes β because soft delete hits every query
πΈ Relationships β what happens to related data when a parent is deleted?
The goal was simple:
Keep the DbContext clean. Make soft delete predictable. No surprises in production.
If working with EF Core in real-world systems, this is something worth getting right early.
Full guide here: π
https://lnkd.in/gRcBPRPZ
π¬ How are you handling soft delete in your projects? Comment below π
β»οΈ If you found this helpful, consider reposting to help others in the community.
π Follow me, Poorna Soysa, and hit the π on my profile so you donβt miss upcoming .NET tips and deep dives.
Soft delete looks simple on paper.
Until you hit production.
Then you start seeing:
πΈ Deleted records showing up in queries
πΈ Audit trails that make no sense
πΈ Bulk operations skipping your delete logic entirely
πΈ Raw SQL ignoring your global filters
I've seen teams spend days debugging issues that came from a poorly implemented soft delete.
So I wrote a practical guide on doing it properly in EF Core.
π What it covers:
πΈ Global query filters β EF Core hides deleted rows automatically
πΈ Interceptors vs SaveChanges override β when to use which
πΈ IgnoreQueryFilters() β for admin views and restore logic
πΈ Filtered indexes β because soft delete hits every query
πΈ Relationships β what happens to related data when a parent is deleted?
The goal was simple:
Keep the DbContext clean. Make soft delete predictable. No surprises in production.
If working with EF Core in real-world systems, this is something worth getting right early.
Full guide here: π
https://lnkd.in/gRcBPRPZ
π¬ How are you handling soft delete in your projects? Comment below π
β»οΈ If you found this helpful, consider reposting to help others in the community.
π Follow me, Poorna Soysa, and hit the π on my profile so you donβt miss upcoming .NET tips and deep dives.