Soenneker.Documents.Audit
4.0.2592
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Documents.Audit --version 4.0.2592
NuGet\Install-Package Soenneker.Documents.Audit -Version 4.0.2592
<PackageReference Include="Soenneker.Documents.Audit" Version="4.0.2592" />
<PackageVersion Include="Soenneker.Documents.Audit" Version="4.0.2592" />
<PackageReference Include="Soenneker.Documents.Audit" />
paket add Soenneker.Documents.Audit --version 4.0.2592
#r "nuget: Soenneker.Documents.Audit, 4.0.2592"
#:package Soenneker.Documents.Audit@4.0.2592
#addin nuget:?package=Soenneker.Documents.Audit&version=4.0.2592
#tool nuget:?package=Soenneker.Documents.Audit&version=4.0.2592
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 both System.Text.Json and Newtonsoft.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, while Newtonsoft.Json normally uses JObject. 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 | Versions 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. |
-
net10.0
- Soenneker.Documents.Document (>= 4.0.2713)
- Soenneker.Enums.CrudEventTypes (>= 4.0.56)
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 |
|---|---|---|
| 4.0.2641 | 44 | 10/15/2026 |
| 4.0.2640 | 45 | 10/15/2026 |
| 4.0.2638 | 73 | 10/14/2026 |
| 4.0.2637 | 83 | 10/14/2026 |
| 4.0.2636 | 90 | 10/14/2026 |
| 4.0.2634 | 50 | 10/14/2026 |
| 4.0.2633 | 83 | 10/14/2026 |
| 4.0.2624 | 97 | 10/13/2026 |
| 4.0.2623 | 88 | 10/12/2026 |
| 4.0.2620 | 230 | 10/12/2026 |
| 4.0.2619 | 228 | 10/12/2026 |
| 4.0.2618 | 113 | 10/12/2026 |
| 4.0.2617 | 138 | 10/11/2026 |
| 4.0.2616 | 165 | 10/11/2026 |
| 4.0.2615 | 118 | 10/11/2026 |
| 4.0.2614 | 1,117 | 9/30/2026 |
| 4.0.2613 | 322 | 9/30/2026 |
| 4.0.2612 | 142 | 9/30/2026 |
| 4.0.2611 | 1,326 | 9/25/2026 |
| 4.0.2592 | 428 | 9/9/2026 |
Updated Soenneker.Documents.Document to 4.0.2713