![]() |
VOOZH | about |
dotnet add package MinimalCleanArch.Audit --version 0.1.19
NuGet\Install-Package MinimalCleanArch.Audit -Version 0.1.19
<PackageReference Include="MinimalCleanArch.Audit" Version="0.1.19" />
<PackageVersion Include="MinimalCleanArch.Audit" Version="0.1.19" />Directory.Packages.props
<PackageReference Include="MinimalCleanArch.Audit" />Project file
paket add MinimalCleanArch.Audit --version 0.1.19
#r "nuget: MinimalCleanArch.Audit, 0.1.19"
#:package MinimalCleanArch.Audit@0.1.19
#addin nuget:?package=MinimalCleanArch.Audit&version=0.1.19Install as a Cake Addin
#tool nuget:?package=MinimalCleanArch.Audit&version=0.1.19Install as a Cake Tool
Audit logging components for MinimalCleanArch.
MinimalCleanArchIAuditContextProvider.IExecutionContext when availabledotnet add package MinimalCleanArch.Audit --version 0.1.19-preview
Register services:
builder.Services.AddAuditLogging();
builder.Services.AddAuditLogService<AppDbContext>();
If IExecutionContext is registered, AddAuditLogging() uses it automatically. Existing IAuditContextProvider customizations still work.
Configure the DbContext:
builder.Services.AddDbContext<AppDbContext>((sp, options) =>
{
options.UseSqlite("Data Source=app.db");
options.UseAuditInterceptor(sp);
});
Configure the audit model:
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.UseAuditLog();
}
Implement a custom context provider when you need tenant-aware auditing:
public sealed class AppAuditContextProvider : IAuditContextProvider
{
public string? GetUserId() => "...";
public string? GetUserName() => "...";
public string? GetTenantId() => "...";
public string? GetCorrelationId() => "...";
public string? GetClientIpAddress() => "...";
public string? GetUserAgent() => "...";
public IDictionary<string, object>? GetMetadata() => null;
}
Notes:
TenantId is a first-class field on AuditLog, so tenant filtering does not need to be pushed into metadata.IAuditLogService supports tenant-aware queries in addition to user and correlation-based lookups.IAuditContextProvider.GetTenantId() now defaults to null, so existing custom providers do not need to implement tenant support immediately.nuget.config pointing to your local packages folder and keep nuget.org available unless your feed mirrors all external dependencies.| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.19 | 113 | 3/18/2026 |
| 0.1.19-preview | 107 | 3/18/2026 |
| 0.1.18 | 125 | 3/13/2026 |
| 0.1.18-preview | 106 | 3/12/2026 |
| 0.1.17 | 124 | 3/12/2026 |
| 0.1.17-preview | 109 | 3/8/2026 |
| 0.1.16-preview | 103 | 3/7/2026 |
| 0.1.15-preview | 102 | 3/3/2026 |
| 0.1.14 | 120 | 3/2/2026 |
| 0.1.14-preview | 102 | 3/1/2026 |
| 0.1.13-preview | 108 | 2/28/2026 |
| 0.1.12-preview | 115 | 2/22/2026 |
| 0.1.11-preview | 111 | 12/27/2025 |
| 0.1.10-preview | 111 | 12/27/2025 |
| 0.1.9-preview | 142 | 12/21/2025 |
| 0.1.8-preview | 251 | 12/15/2025 |
| 0.1.7 | 176 | 12/14/2025 |
| 0.1.7-preview | 433 | 12/11/2025 |
| 0.1.6 | 459 | 12/9/2025 |
| 0.1.6-preview | 494 | 12/9/2025 |