See the version list below for details.
Install-Package EFCore.SoftDelete -Version 1.1.1
dotnet add package EFCore.SoftDelete --version 1.1.1
<PackageReference Include="EFCore.SoftDelete" Version="1.1.1" />
paket add EFCore.SoftDelete --version 1.1.1
#r "nuget: EFCore.SoftDelete, 1.1.1"
// Install EFCore.SoftDelete as a Cake Addin #addin nuget:?package=EFCore.SoftDelete&version=1.1.1 // Install EFCore.SoftDelete as a Cake Tool #tool nuget:?package=EFCore.SoftDelete&version=1.1.1
Ef Core Soft Delete implementation
A very simple implementation for soft deleting entities in Ef Core library.
Extend your application db context from
In entities you want to add soft delete support, implement
It will a column named
DeletedAt to your entity so you need to add a migration and update the database tables.
Load relations you want to delete in soft deleting the entity in
Delete relations you want to delete in soft deleting the entity in
For soft deleting an entity use
RemoveAsync methods. These methods will
soft delete an
ISoftDelete implemented entity and force delete an not implemented entity.
For force deleting any entity use
It doesn't support
DbSet yet, so you have to use
SoftDeletes.Core.DbContext methods for removing
instead of using
An interface for saving
UpdatedAt date and time of entities.
You can implement it in your entities. That will add to columns named
UpdatedAt to your entities.
ModelExtenstion abstract class:
An abstract class that implements
You can use it in your entities.
sample project for this implementation.
If you like it, you can donate BTC(bitcoin) to this wallet
The proposal for this implementation.
|.NET||net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows|
- Microsoft.EntityFrameworkCore (>= 3.1.5)
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.