Soenneker.Cosmos.RequestOptions
4.0.177
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Cosmos.RequestOptions --version 4.0.177
NuGet\Install-Package Soenneker.Cosmos.RequestOptions -Version 4.0.177
<PackageReference Include="Soenneker.Cosmos.RequestOptions" Version="4.0.177" />
<PackageVersion Include="Soenneker.Cosmos.RequestOptions" Version="4.0.177" />
<PackageReference Include="Soenneker.Cosmos.RequestOptions" />
paket add Soenneker.Cosmos.RequestOptions --version 4.0.177
#r "nuget: Soenneker.Cosmos.RequestOptions, 4.0.177"
#:package Soenneker.Cosmos.RequestOptions@4.0.177
#addin nuget:?package=Soenneker.Cosmos.RequestOptions&version=4.0.177
#tool nuget:?package=Soenneker.Cosmos.RequestOptions&version=4.0.177
Soenneker.Cosmos.RequestOptions
Small factory properties for common Azure Cosmos DB request-option configurations.
Installation
dotnet add package Soenneker.Cosmos.RequestOptions
Suppress write response content
ItemResponse<OrderDocument> response = await container.CreateItemAsync(
order,
new PartitionKey(order.PartitionKey),
CosmosRequestOptions.ExcludeResponse,
cancellationToken);
ExcludeResponse returns an ItemRequestOptions instance with EnableContentResponseOnWrite = false. This reduces response payload work when the caller does not need Cosmos to return the stored resource. The resulting ItemResponse<T>.Resource may be absent; keep using the document passed to the write when needed.
Request one item per query page
using FeedIterator<OrderDocument> iterator = container.GetItemQueryIterator<OrderDocument>(
queryDefinition,
requestOptions: CosmosRequestOptions.MaxItemCountOne);
MaxItemCountOne returns a QueryRequestOptions instance with MaxItemCount = 1. It limits the requested page size; it does not add TOP 1 to the query or guarantee that Cosmos will produce exactly one item on every page.
Each property access returns a new mutable SDK options object, so callers can customize it without changing another request:
QueryRequestOptions options = CosmosRequestOptions.MaxItemCountOne;
options.PartitionKey = new PartitionKey("tenant-42");
No dependency-injection registration or application configuration is required.
| 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
- Microsoft.Azure.Cosmos (>= 3.63.0)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Cosmos.RequestOptions:
| Package | Downloads |
|---|---|
|
Soenneker.Cosmos.Repository
A data persistence abstraction layer for Cosmos DB |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.178 | 85 | 9/12/2026 |
| 4.0.177 | 465 | 9/9/2026 |
| 4.0.176 | 2,892 | 8/30/2026 |
| 4.0.175 | 169 | 8/29/2026 |
| 4.0.174 | 2,950 | 8/7/2026 |
| 4.0.173 | 1,387 | 7/27/2026 |
| 4.0.172 | 1,284 | 7/17/2026 |
| 4.0.171 | 674 | 7/16/2026 |
| 4.0.170 | 2,932 | 6/18/2026 |
| 4.0.169 | 2,570 | 6/5/2026 |
| 4.0.168 | 115 | 6/5/2026 |
| 4.0.167 | 1,195 | 5/19/2026 |
| 4.0.166 | 1,568 | 4/25/2026 |
| 4.0.165 | 665 | 4/22/2026 |
| 4.0.164 | 1,757 | 3/20/2026 |
| 4.0.163 | 1,233 | 3/12/2026 |
| 4.0.162 | 129 | 3/12/2026 |
| 4.0.161 | 120 | 3/12/2026 |
| 4.0.160 | 137 | 3/12/2026 |
| 4.0.159 | 1,600 | 3/10/2026 |
Updated Microsoft.Azure.Cosmos to 3.63.0