Soenneker.Cosmos.Repositories.Audits 4.0.724

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

A Cosmos DB repository specialized for AuditDocument records stored in the audits container.

Installation

dotnet add package Soenneker.Cosmos.Repositories.Audits

Registration

using Soenneker.Cosmos.Repositories.Audits.Abstract;
using Soenneker.Cosmos.Repositories.Audits.Registrars;

services.AddAuditsRepositoryAsScoped();

IAuditsRepository audits = serviceProvider.GetRequiredService<IAuditsRepository>();

Use the scoped registration because the repository depends on scoped user context. AddAuditsRepositoryAsSingleton() remains for source compatibility but is obsolete and now also registers a scoped repository.

The registrar adds the background queue, user context, and Cosmos container dependencies. Configure the Cosmos dependencies under Azure:Cosmos as required by those packages.

Get an entity's audit history

List<AuditDocument> history = await audits.GetByEntity(
    entityId,
    cancellationToken);

entityId is used as the Cosmos partition key. The method returns every audit document in that partition; it does not apply additional ordering or pagination.

Mutation boundary

AddItem, the UpdateItem(id, ...) overload, and the DeleteItem(id, ...) overload are marked obsolete with compile-time errors and throw NotSupportedException from the concrete repository. Audit creation is expected to happen through the audit behavior in the general Cosmos repository rather than through this specialized repository.

This API is not an authorization boundary. IAuditsRepository inherits the broader ICosmosRepository<AuditDocument> contract, which includes other mutation operations. Do not expose the repository to untrusted callers; enforce write restrictions in the application and Cosmos account permissions.

The repository disables recursive audit generation for the audits container. Cosmos failures and cancellation propagate according to the underlying repository operation.

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

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
4.0.725 0 8/30/2026
4.0.724 0 8/30/2026
4.0.723 0 8/30/2026
4.0.722 0 8/30/2026
4.0.721 32 8/30/2026
4.0.720 31 8/30/2026
4.0.719 36 8/29/2026
4.0.718 39 8/29/2026
4.0.717 32 8/29/2026
4.0.716 69 8/27/2026
4.0.715 79 8/27/2026
4.0.714 79 8/26/2026
4.0.713 69 8/26/2026
4.0.712 69 8/26/2026
4.0.711 63 8/26/2026
4.0.710 93 8/22/2026
4.0.709 82 8/22/2026
4.0.708 96 8/22/2026
4.0.707 90 8/22/2026
4.0.706 84 8/21/2026
Loading failed

Update dependency Soenneker.Cosmos.Repository to 4.0.8178 (#1251)