Linger.EFCore.Audit
0.2.0-alpha
This is a prerelease version of Linger.EFCore.Audit.
dotnet add package Linger.EFCore.Audit --version 0.2.0-alpha
NuGet\Install-Package Linger.EFCore.Audit -Version 0.2.0-alpha
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="Linger.EFCore.Audit" Version="0.2.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Linger.EFCore.Audit --version 0.2.0-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Linger.EFCore.Audit, 0.2.0-alpha"
#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.
// Install Linger.EFCore.Audit as a Cake Addin #addin nuget:?package=Linger.EFCore.Audit&version=0.2.0-alpha&prerelease // Install Linger.EFCore.Audit as a Cake Tool #tool nuget:?package=Linger.EFCore.Audit&version=0.2.0-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Linger.EFCore.Audit
An Entity Framework Core audit trail library for automatically tracking data changes.
✨ Features
- Automatic audit logging for Entity Framework Core operations
- Tracks entity creation, modification, and deletion
- Captures old and new values for changed properties
- Records user information for each change
- Supports soft delete
- Built-in JSON serialization for audit data
- Compatible with EF Core 9.0 and 8.0
📦 Installation
From Visual Studio
- Open the
Solution Explorer
. - Right-click on a project within your solution.
- Click on
Manage NuGet Packages...
. - Click on the
Browse
tab and search for "Linger.EFCore.Audit". - Click on the
Linger.EFCore.Audit
package, select the appropriate version and click Install.
Package Manager Console
PM> Install-Package Linger.EFCore.Audit
.NET CLI Console
> dotnet add package Linger.EFCore.Audit
🚀 Quick Start
// 1. Add audit trail to your DbContext
public class AppDbContext : DbContext
{
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyAudit(); // Apply audit configurations
}
}
// 2. Register the audit interceptor
services.AddDbContext(options => { options.AddInterceptors(sp => new AuditEntitiesSaveChangesInterceptor( sp.GetRequiredService() )); });
📄 Audit Trail Data
The AuditTrailEntry
captures:
- Entity name and ID
- Type of change (Added/Modified/Deleted)
- Username performing the change
- Timestamp
- Old and new property values
- List of modified columns
🔍 Automatic Tracking
- Creation audit: CreatorId, CreationTime
- Modification audit: LastModifierId, LastModificationTime
- Soft delete: IsDeleted, DeleterId, DeletionTime
📝 License
This project is licensed under the MIT License.
Product | Versions 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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Linger.Audit (>= 0.2.0-alpha)
- Linger.EFCore (>= 0.2.0-alpha)
- Microsoft.EntityFrameworkCore (>= 9.0.1)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.1)
-
net9.0
- Linger.Audit (>= 0.2.0-alpha)
- Linger.EFCore (>= 0.2.0-alpha)
- Microsoft.EntityFrameworkCore (>= 9.0.1)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.1)
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.2.0-alpha | 38 | 2/9/2025 |