DKNet.EfCore.AuditLogs 10.1.10

dotnet add package DKNet.EfCore.AuditLogs --version 10.1.10
                    
NuGet\Install-Package DKNet.EfCore.AuditLogs -Version 10.1.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DKNet.EfCore.AuditLogs" Version="10.1.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DKNet.EfCore.AuditLogs" Version="10.1.10" />
                    
Directory.Packages.props
<PackageReference Include="DKNet.EfCore.AuditLogs" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DKNet.EfCore.AuditLogs --version 10.1.10
                    
#r "nuget: DKNet.EfCore.AuditLogs, 10.1.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DKNet.EfCore.AuditLogs@10.1.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DKNet.EfCore.AuditLogs&version=10.1.10
                    
Install as a Cake Addin
#tool nuget:?package=DKNet.EfCore.AuditLogs&version=10.1.10
                    
Install as a Cake Tool

DKNet.EfCore.AuditLogs

A DKNet.EfCore.Hooks-based SaveChanges interceptor that captures a structured, field-level audit trail of entity changes — with automatic redaction of likely-sensitive values — and hands finished batches to your own publisher(s).

Install

dotnet add package DKNet.EfCore.AuditLogs

Features

  • Automatic before/after-SaveChanges capture of Created/Updated/Deleted entities implementing IAuditedProperties, with per-field old/new value diffs.
  • Built-in redaction of likely-sensitive properties (passwords, tokens, connection strings, SecureString, …), overridable per-property via [AuditLog] and forced via [SensitiveData] from DKNet.EfCore.Abstractions.
  • Pluggable IAuditLogPublisher extension point — ship audit batches to a database, queue, log sink, or anywhere else; multiple publishers per DbContext are supported.
  • Configurable scope: audit every entity or only those explicitly marked [AuditLog], and capture every property or only allow-listed ones.

Quick start

using DKNet.EfCore.AuditLogs;
using DKNet.EfCore.Hooks;

// 1. Register the DbContext through the hook-aware overload.
services.AddDbContextWithHook<AppDbContext>((provider, options) =>
    options.UseSqlServer(connectionString));

// 2. Register the audit hook plus a publisher, keyed to AppDbContext.
services.AddEfCoreAuditLogs<AppDbContext, MyAuditLogPublisher>();

// 3. Implement the publisher.
public sealed class MyAuditLogPublisher : IAuditLogPublisher
{
    public Task PublishAsync(IEnumerable<AuditLogEntry> logs, CancellationToken cancellationToken = default)
    {
        foreach (var log in logs)
            Console.WriteLine($"[{log.Action}] {log.EntityName} by {log.UpdatedBy ?? log.CreatedBy}");
        return Task.CompletedTask;
    }
}

Full documentation: https://github.com/baoduy/DKNet/blob/dev/docs/EfCore/DKNet.EfCore.AuditLogs.md

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.10 35 8/22/2026
10.1.9 52 8/22/2026
10.1.8 48 8/21/2026
10.1.7 60 8/21/2026
10.1.6 52 8/21/2026
10.1.5 66 8/20/2026
10.1.4 74 8/20/2026
10.1.3 74 8/19/2026
10.1.2 70 8/19/2026
10.1.1 70 8/19/2026
10.0.36 75 8/18/2026
10.0.35 100 8/5/2026
10.0.34 95 8/5/2026
10.0.33 96 8/4/2026
10.0.32 231 8/3/2026
10.0.31 95 7/21/2026
10.0.30 107 7/21/2026
10.0.29 388 6/22/2026
10.0.27 157 5/22/2026
10.0.26 114 5/19/2026
Loading failed