EfCore.SoftDeleteServices 1.1.0

Services to provide simple soft delete and cascade soft delete in EF Core.

Install-Package EfCore.SoftDeleteServices -Version 1.1.0
dotnet add package EfCore.SoftDeleteServices --version 1.1.0
<PackageReference Include="EfCore.SoftDeleteServices" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EfCore.SoftDeleteServices --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

EfCore.SoftDeleteServices

This library to provide simple soft delete and cascade soft delete in EF Core. It provides:

  • Useful methods: The features in this library are:
    • Set the SoftDeleted flag on an entity class, with checks.
    • Provides a secure query to find all the Soft Deleted entities for a specific entity class.
    • Reset the SoftDeleted flag on an entity class, which checks.
    • Hard delete (i.e. call EF Core Remove method) a entity class, but only if it is already Soft Deleted.
      NOTE: Methods can work with entity instance, or found via primary keys. Also has sync and async versions of all methods.
  • Cascade Soft Delete: This library has a service that can mimic the database cascade delete, but Soft Deleting the entities. For instance, Cascade Soft Deleting a Company could also soft delete dependent relationships.
  • Keeps your data secure: This library can handle Query Filters that contain multiple parts to the filter, e.g. Soft Delete with a multi-tenant filter. It builds queries that will replace the other filters so that your data stays secure.
  • Fully configurable: It works with your properties and interfaces. The only rule it has is your Soft Delete property must provide true/false value (normally a 'bool', but could be part of enum status, etc.), or for the cascade delete it must provide a byte value.
  • DI-friendly: This library is designed to work with dependency injection (DI) and contains a method which will scan for your Soft Delete configuration files and set up all the services you need to use this library.

EfCore.SoftDeleteServices

This library to provide simple soft delete and cascade soft delete in EF Core. It provides:

  • Useful methods: The features in this library are:
    • Set the SoftDeleted flag on an entity class, with checks.
    • Provides a secure query to find all the Soft Deleted entities for a specific entity class.
    • Reset the SoftDeleted flag on an entity class, which checks.
    • Hard delete (i.e. call EF Core Remove method) a entity class, but only if it is already Soft Deleted.
      NOTE: Methods can work with entity instance, or found via primary keys. Also has sync and async versions of all methods.
  • Cascade Soft Delete: This library has a service that can mimic the database cascade delete, but Soft Deleting the entities. For instance, Cascade Soft Deleting a Company could also soft delete dependent relationships.
  • Keeps your data secure: This library can handle Query Filters that contain multiple parts to the filter, e.g. Soft Delete with a multi-tenant filter. It builds queries that will replace the other filters so that your data stays secure.
  • Fully configurable: It works with your properties and interfaces. The only rule it has is your Soft Delete property must provide true/false value (normally a 'bool', but could be part of enum status, etc.), or for the cascade delete it must provide a byte value.
  • DI-friendly: This library is designed to work with dependency injection (DI) and contains a method which will scan for your Soft Delete configuration files and set up all the services you need to use this library.

Release Notes

New feature: Can now use shadow properties to hold the soft delete value

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0 66 1/12/2021
1.0.0 81 1/9/2021
1.0.0-preview004 33 1/8/2021
1.0.0-preview003 35 1/8/2021
1.0.0-preview002 56 1/8/2021
1.0.0-preview001 69 1/8/2021