Auditify 0.1.0

dotnet add package Auditify --version 0.1.0
                    
NuGet\Install-Package Auditify -Version 0.1.0
                    
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="Auditify" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Auditify" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Auditify" />
                    
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 Auditify --version 0.1.0
                    
#r "nuget: Auditify, 0.1.0"
                    
#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 Auditify@0.1.0
                    
#: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=Auditify&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Auditify&version=0.1.0
                    
Install as a Cake Tool

Auditify

A lightweight, pluggable audit-trail library for Entity Framework Core 8+. Une bibliothèque légère et plug-and-play de traçabilité pour Entity Framework Core 8+.


🇬🇧 English

Overview

Auditify automatically captures entity changes (Added/Modified/Deleted) in your EF Core DbContext and persists them as structured audit logs. It supports sensitive data masking, soft-delete patterns, and automatic timestamp tracking — all configurable through a simple options API.

Features

  • ✅ Automatic audit logging — Captures entity changes via EF Core SaveChangesInterceptor
  • ✅ Sensitive data masking — Hides Password, Token, Secret, ApiKey values
  • ✅ Soft delete support — Implements ISoftDelete interface
  • ✅ Timestamp tracking — Implements IAuditableEntity (Created/Updated)
  • ✅ Two integration modes — Interceptor (automatic) or UnitOfWork (explicit)
  • ✅ Configurable — AuditifyOptions for fine-grained control
  • ✅ DI ready — Simple AddAuditify() registration
  • ✅ .NET 8 — Built for the latest .NET

Quick Start

1. Install
dotnet add package Auditify
2. Register services
// Minimal setup
services.AddAuditify();

Or with a custom DbContext:

services.AddAuditifyWithDbContext<YourDbContext>(options =>
{
    options.UseSqlServer(connectionString);
});
3. Configure the interceptor
builder.Services.AddDbContext<YourDbContext>(options =>
{
    options.UseSqlServer(connectionString)
           .AddInterceptors(
               services.BuildServiceProvider()
                       .GetRequiredService<PersistingAuditInterceptor>());
});
4. Customize options
services.AddAuditify(options =>
{
    options.SensitiveProperties = ["Password", "Token", "Secret", "ApiKey"];
    options.TrackIpAddress = true;
    options.TrackCorrelationId = true;
    options.AuditLogsTableName = "MyAuditLogs";
});
5. Use the UnitOfWork (optional)
public class YourService
{
    private readonly IUnitOfWork _uow;

    public YourService(IUnitOfWork uow) => _uow = uow;

    public async Task SaveAsync()
    {
        // Handles audit, soft delete, and timestamps automatically
        await _uow.AutomaticSavingAsync();
    }
}

Architecture

┌────────────────────────────────────────────┐
│             Your Application                │
├────────────────────────────────────────────┤
│  Auditify                                   │
│  ├── Core Layer (AuditService, Builder, …) │
│  ├── EF Core Integration (Interceptor, …)  │
│  ├── Configuration (AuditifyOptions)       │
│  └── DI Registration (AddAuditify)         │
└────────────────────────────────────────────┘

Namespaces

Namespace Role
Auditify.Abstractions Interfaces (IAuditService, ICurrentUser, …)
Auditify.Core Core implementations
Auditify.Entities Entity models (AuditLog, EntityChange, User)
Auditify.EntityFrameworkCore EF Core integration
Auditify.Configuration Options
Auditify.DependencyInjection Service registration

🇫🇷 Français

Vue d'ensemble

Auditify capture automatiquement les modifications d'entités (Ajoutées/Modifiées/Supprimées) dans votre DbContext EF Core et les persist sous forme de logs d'audit structurés. Elle prend en charge le masquage des données sensibles, le soft delete, et la gestion automatique des horodatages — le tout configurable via une API d'options simple.

Fonctionnalités

  • ✅ Journalisation automatique — Capture les modifications via l'intercepteur EF Core
  • ✅ Masquage des données sensibles — Cache les mots de passe, jetons, secrets
  • ✅ Soft delete — Implémente l'interface ISoftDelete
  • ✅ Horodatage — Implémente IAuditableEntity (Created/Updated)
  • ✅ Deux modes d'intégration — Intercepteur (automatique) ou UnitOfWork (explicite)
  • ✅ Configurable — AuditifyOptions pour un contrôle fin
  • ✅ Prêt pour l'injection de dépendances — Simple appel AddAuditify()
  • ✅ .NET 8 — Construit pour la dernière version de .NET

Démarrage rapide

1. Installation
dotnet add package Auditify
2. Enregistrement des services
// Configuration minimale
services.AddAuditify();

Ou avec un DbContext personnalisé :

services.AddAuditifyWithDbContext<VotreDbContext>(options =>
{
    options.UseSqlServer(connectionString);
});
3. Configuration de l'intercepteur
builder.Services.AddDbContext<VotreDbContext>(options =>
{
    options.UseSqlServer(connectionString)
           .AddInterceptors(
               services.BuildServiceProvider()
                       .GetRequiredService<PersistingAuditInterceptor>());
});
4. Personnalisation des options
services.AddAuditify(options =>
{
    options.SensitiveProperties = ["Password", "Token", "Secret", "ApiKey"];
    options.TrackIpAddress = true;
    options.TrackCorrelationId = true;
    options.AuditLogsTableName = "MesLogsAudit";
});
5. Utilisation du UnitOfWork (optionnel)
public class VotreService
{
    private readonly IUnitOfWork _uow;

    public VotreService(IUnitOfWork uow) => _uow = uow;

    public async Task SauvegarderAsync()
    {
        // Gère l'audit, le soft delete et les horodatages automatiquement
        await _uow.AutomaticSavingAsync();
    }
}

Licence

MIT — Copyright (c) 2026, NID BOUBKER Houssine


Built with ❤️ for the .NET ecosystem.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
0.1.0 119 7/30/2026