Soenneker.Cosmos.Suite
11.0.3602
Prefix Reserved
dotnet add package Soenneker.Cosmos.Suite --version 11.0.3602
NuGet\Install-Package Soenneker.Cosmos.Suite -Version 11.0.3602
<PackageReference Include="Soenneker.Cosmos.Suite" Version="11.0.3602" />
<PackageVersion Include="Soenneker.Cosmos.Suite" Version="11.0.3602" />
<PackageReference Include="Soenneker.Cosmos.Suite" />
paket add Soenneker.Cosmos.Suite --version 11.0.3602
#r "nuget: Soenneker.Cosmos.Suite, 11.0.3602"
#:package Soenneker.Cosmos.Suite@11.0.3602
#addin nuget:?package=Soenneker.Cosmos.Suite&version=11.0.3602
#tool nuget:?package=Soenneker.Cosmos.Suite&version=11.0.3602
Soenneker.Cosmos.Suite
One registration method for the Soenneker Azure Cosmos DB client, database, container, and setup utilities.
Installation
dotnet add package Soenneker.Cosmos.Suite
Configuration
{
"Environment": "Production",
"Azure": {
"Cosmos": {
"Endpoint": "https://your-account.documents.azure.com:443/",
"AccountKey": "your-account-key",
"DatabaseName": "app",
"ConnectionMode": "Direct",
"AllowBulkExecution": false,
"EnsureDatabaseOnFirstUse": true,
"EnsureContainerOnFirstUse": true,
"DatabaseThroughput": 1000,
"DatabaseThroughputType": "autoscale",
"ReplaceDatabaseThroughput": false
}
}
}
Environment, Endpoint, AccountKey, and DatabaseName are required. ConnectionMode defaults to Direct and accepts Direct or Gateway case-insensitively.
Database and container creation both default to enabled on first use. When database creation is enabled, DatabaseThroughput and DatabaseThroughputType are required by the setup utility. Set the ensure flags to false when the application must only use resources provisioned elsewhere.
Registration and use
using Soenneker.Cosmos.Container.Abstract;
using Soenneker.Cosmos.Database.Abstract;
using Soenneker.Cosmos.Suite.Registrars;
services.AddCosmosSuiteAsSingleton();
ICosmosDatabaseUtil databases =
serviceProvider.GetRequiredService<ICosmosDatabaseUtil>();
ICosmosContainerUtil containers =
serviceProvider.GetRequiredService<ICosmosContainerUtil>();
Microsoft.Azure.Cosmos.Database database =
await databases.Get(cancellationToken);
Microsoft.Azure.Cosmos.Container orders =
await containers.Get("orders", cancellationToken);
AddCosmosSuiteAsSingleton() registers ICosmosDatabaseUtil and ICosmosContainerUtil as singletons. Their setup, client, serializer, HTTP-cache, and memory-stream dependencies are added transitively. Registrations use TryAdd, so application registrations made before the suite are preserved.
The suite does not add the higher-level repository abstractions and does not create resources during service registration. Resource creation, connection failures, and cancellation occur when a utility is first used and propagate to the caller.
AllowInsecureServerCertificate is intentionally omitted above. If enabled, the client accepts it only when Environment is Local or Test; never use it for deployed environments.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Cosmos.Container (>= 11.0.2636)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Cosmos.Suite:
| Package | Downloads |
|---|---|
|
Soenneker.Cosmos.Copy
A utility to copy to and from Cosmos databases and containers |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.3602 | 0 | 11/15/2026 |
| 11.0.3601 | 0 | 11/15/2026 |
| 11.0.3600 | 143 | 11/12/2026 |
| 11.0.3599 | 91 | 11/12/2026 |
| 11.0.3598 | 92 | 11/11/2026 |
| 11.0.3597 | 95 | 11/11/2026 |
| 11.0.3596 | 82 | 11/11/2026 |
| 11.0.3595 | 102 | 11/11/2026 |
| 11.0.3594 | 87 | 11/11/2026 |
| 11.0.3593 | 97 | 11/11/2026 |
| 11.0.3592 | 77 | 11/11/2026 |
| 11.0.3591 | 176 | 11/7/2026 |
| 11.0.3590 | 91 | 11/7/2026 |
| 11.0.3589 | 219 | 11/3/2026 |
| 11.0.3588 | 99 | 11/3/2026 |
| 11.0.3587 | 100 | 11/3/2026 |
| 11.0.3586 | 127 | 10/29/2026 |
| 11.0.3585 | 140 | 10/28/2026 |
| 11.0.3584 | 114 | 10/27/2026 |
| 11.0.3583 | 108 | 10/27/2026 |
Update dependency Soenneker.Cosmos.Container to 11.0.2636 (#4455)