Soenneker.Cosmos.Repository 4.0.8143

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Cosmos.Repository --version 4.0.8143
                    
NuGet\Install-Package Soenneker.Cosmos.Repository -Version 4.0.8143
                    
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.8143" />
                    
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.8143" />
                    
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.8143
                    
#r "nuget: Soenneker.Cosmos.Repository, 4.0.8143"
                    
#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.8143
                    
#: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.8143
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Cosmos.Repository&version=4.0.8143
                    
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.8441 187 10/15/2026
4.0.8440 153 10/15/2026
4.0.8439 99 10/15/2026
4.0.8438 92 10/15/2026
4.0.8437 59 10/15/2026
4.0.8434 97 10/14/2026
4.0.8433 79 10/14/2026
4.0.8429 101 10/14/2026
4.0.8428 104 10/14/2026
4.0.8424 97 10/14/2026
4.0.8410 152 10/13/2026
4.0.8407 163 10/12/2026
4.0.8404 144 10/12/2026
4.0.8403 175 10/12/2026
4.0.8401 116 10/12/2026
4.0.8398 82 10/12/2026
4.0.8397 117 10/12/2026
4.0.8396 165 10/11/2026
4.0.8393 86 10/11/2026
4.0.8143 147 8/26/2026
Loading failed

Updated NuGet packages