Soenneker.Cosmos.Repository
4.0.8058
Prefix Reserved
dotnet add package Soenneker.Cosmos.Repository --version 4.0.8058
NuGet\Install-Package Soenneker.Cosmos.Repository -Version 4.0.8058
<PackageReference Include="Soenneker.Cosmos.Repository" Version="4.0.8058" />
<PackageVersion Include="Soenneker.Cosmos.Repository" Version="4.0.8058" />
<PackageReference Include="Soenneker.Cosmos.Repository" />
paket add Soenneker.Cosmos.Repository --version 4.0.8058
#r "nuget: Soenneker.Cosmos.Repository, 4.0.8058"
#:package Soenneker.Cosmos.Repository@4.0.8058
#addin nuget:?package=Soenneker.Cosmos.Repository&version=4.0.8058
#tool nuget:?package=Soenneker.Cosmos.Repository&version=4.0.8058
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 | 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.ConcurrentProcessing.Executor (>= 4.0.315)
- Soenneker.Constants.Data (>= 4.0.637)
- Soenneker.Cosmos.Container (>= 4.0.2471)
- Soenneker.Cosmos.RequestOptions (>= 4.0.173)
- Soenneker.Documents.Audit (>= 4.0.2554)
- Soenneker.Dtos.IdNamePair (>= 4.0.717)
- Soenneker.Dtos.IdPartitionPair (>= 4.0.721)
- Soenneker.Utils.BackgroundQueue (>= 4.0.2435)
- Soenneker.Utils.Json (>= 4.0.2604)
- Soenneker.Utils.Method (>= 4.0.457)
- Soenneker.Utils.PooledStringBuilders (>= 4.0.27)
- Soenneker.Utils.UserContext (>= 4.0.1760)
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.8058 | 0 | 7/28/2026 |
| 4.0.8053 | 0 | 7/28/2026 |
| 4.0.8049 | 0 | 7/28/2026 |
| 4.0.8040 | 0 | 7/27/2026 |
| 4.0.8036 | 8 | 7/27/2026 |
| 4.0.8035 | 31 | 7/27/2026 |
| 4.0.8034 | 37 | 7/27/2026 |
| 4.0.8033 | 35 | 7/27/2026 |
| 4.0.8032 | 224 | 7/21/2026 |
| 4.0.8031 | 177 | 7/20/2026 |
| 4.0.8030 | 120 | 7/19/2026 |
| 4.0.8029 | 168 | 7/19/2026 |
| 4.0.8028 | 122 | 7/19/2026 |
| 4.0.8026 | 127 | 7/19/2026 |
| 4.0.8025 | 116 | 7/19/2026 |
| 4.0.8023 | 162 | 7/18/2026 |
| 4.0.8021 | 123 | 7/18/2026 |
| 4.0.8020 | 102 | 7/18/2026 |
| 4.0.8017 | 177 | 7/18/2026 |
| 4.0.8016 | 90 | 7/18/2026 |
Update dependency Soenneker.ConcurrentProcessing.Executor to 4.0.315 (#8916)