Soenneker.Documents.Audit 4.0.2612

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Documents.Audit --version 4.0.2612
                    
NuGet\Install-Package Soenneker.Documents.Audit -Version 4.0.2612
                    
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="Soenneker.Documents.Audit" Version="4.0.2612" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Documents.Audit" Version="4.0.2612" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Documents.Audit" />
                    
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 Soenneker.Documents.Audit --version 4.0.2612
                    
#r "nuget: Soenneker.Documents.Audit, 4.0.2612"
                    
#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 Soenneker.Documents.Audit@4.0.2612
                    
#: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=Soenneker.Documents.Audit&version=4.0.2612
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Documents.Audit&version=4.0.2612
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Documents.Audit

Defines an audit-event document with entity, event, actor, and document metadata.

Installation

dotnet add package Soenneker.Documents.Audit

Usage

using Soenneker.Documents.Audit;
using Soenneker.Enums.CrudEventTypes;

string entityId = "customer-42";

var audit = new AuditDocument
{
    DocumentId = Guid.NewGuid().ToString("N"),
    PartitionKey = entityId,
    CreatedAt = DateTimeOffset.UtcNow,
    EntityId = entityId,
    EntityType = "Customer",
    EventType = CrudEventType.Update,
    UserId = currentUserId,
    Entity = new
    {
        Name = "Ada Lovelace",
        Status = "Active"
    }
};

DocumentId identifies the audit event. EntityId identifies the affected entity. Set PartitionKey to EntityId when using the package’s intended partitioning convention; the class does not assign or validate that relationship automatically.

Inherited document fields serialize as id, partitionKey, createdAt, and modifiedAt. Audit fields serialize as entity, entityId, entityType, eventType, and userId with System.Text.Json attributes.

Entity is typed as object so callers can store a snapshot or change payload. On deserialization, System.Text.Json normally materializes unknown object values as JsonElement. Use a known payload type or serializer-specific conversion when the snapshot must be read back as a concrete model.

EventType uses CrudEventType.Create, Read, Update, or Delete. The model does not generate IDs, timestamps, or actor information; populate those values before persistence.

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 (1)

Showing the top 1 NuGet packages that depend on Soenneker.Documents.Audit:

Package Downloads
Soenneker.Cosmos.Repository

A data persistence abstraction layer for Cosmos DB

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.2660 330 11/11/2026
11.0.2659 124 11/11/2026
11.0.2658 89 11/11/2026
11.0.2657 135 11/11/2026
11.0.2656 74 11/11/2026
11.0.2655 133 11/11/2026
11.0.2654 78 11/11/2026
11.0.2652 257 11/10/2026
11.0.2651 1,135 11/3/2026
11.0.2649 414 11/2/2026
11.0.2648 769 10/27/2026
11.0.2647 147 10/27/2026
11.0.2646 513 10/26/2026
11.0.2645 208 10/26/2026
11.0.2644 96 10/26/2026
11.0.2643 88 10/26/2026
11.0.2642 213 10/26/2026
4.0.2641 892 10/15/2026
4.0.2640 104 10/15/2026
4.0.2612 152 9/30/2026
Loading failed

Remove Newtonsoft serialization support