Soenneker.Cosmos.Repository 4.0.8065

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

alternate text is missing from this package README image Soenneker.Cosmos.Repository

A data persistence abstraction layer for Cosmos DB

Installation

dotnet add package Soenneker.Cosmos.Repository

Optimistic concurrency

Read an item with its ETag, then use an explicit conditional write:

CosmosItem<MyDocument>? item = await repository.GetItemWithETag(id, cancellationToken);

if (item is not null)
{
    item.Document.Name = "Updated";
    item = await repository.UpdateItemIfMatch(item, cancellationToken);
}

The returned wrapper contains the updated document and the new ETag required for another conditional write. If another writer changes the item between the read and write, Cosmos DB returns 412 Precondition Failed.

Existing UpdateItem, PatchItem, and DeleteItem methods remain unconditional for backward compatibility. Conditional *IfMatch variants are immediate operations so they can return the new ETag and synchronously surface concurrency failures. Sequential and parallel conditional bulk updates accept and return List<CosmosItem<TDocument>>, keeping every ETag paired with its document.

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

Showing the top 3 NuGet packages that depend on Soenneker.Cosmos.Repository:

Package Downloads
Soenneker.Managers.Entities

An abstract generic manager class provides CRUD operations for entities mapped to Cosmos DB documents

Soenneker.Cosmos.Repositories.Audits

A data persistence abstraction layer for Cosmos DB Audit type documents

Soenneker.Cosmos.Repositories.Shared

A data persistence abstraction layer for Cosmos DB containers that have multiple document types

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.8065 0 7/28/2026
4.0.8062 0 7/28/2026
4.0.8061 0 7/28/2026
4.0.8058 0 7/28/2026
4.0.8053 43 7/28/2026
4.0.8049 50 7/28/2026
4.0.8040 93 7/27/2026
4.0.8036 82 7/27/2026
4.0.8035 142 7/27/2026
4.0.8034 111 7/27/2026
4.0.8033 88 7/27/2026
4.0.8032 245 7/21/2026
4.0.8031 178 7/20/2026
4.0.8030 121 7/19/2026
4.0.8029 169 7/19/2026
4.0.8028 125 7/19/2026
4.0.8026 128 7/19/2026
4.0.8025 118 7/19/2026
4.0.8023 164 7/18/2026
4.0.8021 124 7/18/2026
Loading failed

Update dependency Soenneker.Documents.Audit to 4.0.2555 (#8925)