Ling.Audit.EntityFrameworkCore 2.1.0

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

Ling.Audit.EntityFrameworkCore

Entity Framework Core persistence integration for Ling.Audit.

This package applies audit metadata during SaveChanges, maintains creation, modification, and deletion fields, records entity and field-level change logs, and provides soft-delete query filtering.

Installation

dotnet add package Ling.Audit.EntityFrameworkCore

The package targets .NET 6.0 through .NET 10.0 and uses the matching EF Core major version.

Quick start

public sealed class AppDbContext(DbContextOptions<AppDbContext> options) : DbContext(options)
{
    public DbSet<Order> Orders => Set<Order>();
    public DbSet<AuditEntityChangeLog<string>> EntityChanges =>
        Set<AuditEntityChangeLog<string>>();

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<Order>().IsAuditable();
        modelBuilder.SetupSoftDeleteQueryFilter();
    }
}

services.AddDbContext<AppDbContext>(options =>
{
    options.UseSqlServer(connectionString);
    options.UseAudit<MyUserProvider, string>();
});

Entities must be declared partial and implement one of the audit contracts from Ling.Audit, such as ICreationAudited<TKey> or IFullAudited<TKey>. The source generator supplies the matching properties at compile time.

User context and transactions

Register an AuditContextProviderBase<TUserId> implementation to supply the current user, IP address, or client information. For ASP.NET Core request context integration, use Ling.Audit.AspNetCore.

When using AuditTransactionMode.RequireExplicitTransaction, wrap business changes in an explicit EF Core transaction so the business write and its audit records commit or roll back together.

Further reading

See the repository documentation for migration notes, transaction behavior, and the runnable sample.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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.  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 (1)

Showing the top 1 NuGet packages that depend on Ling.Audit.EntityFrameworkCore:

Package Downloads
Ling.Audit.AspNetCore

ASP.NET Core user and request context integration for Ling.Audit.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.0 117 8/31/2026
2.0.1 112 8/31/2026