Soenneker.Cosmos.RequestOptions
11.0.198
Prefix Reserved
dotnet add package Soenneker.Cosmos.RequestOptions --version 11.0.198
NuGet\Install-Package Soenneker.Cosmos.RequestOptions -Version 11.0.198
<PackageReference Include="Soenneker.Cosmos.RequestOptions" Version="11.0.198" />
<PackageVersion Include="Soenneker.Cosmos.RequestOptions" Version="11.0.198" />
<PackageReference Include="Soenneker.Cosmos.RequestOptions" />
paket add Soenneker.Cosmos.RequestOptions --version 11.0.198
#r "nuget: Soenneker.Cosmos.RequestOptions, 11.0.198"
#:package Soenneker.Cosmos.RequestOptions@11.0.198
#addin nuget:?package=Soenneker.Cosmos.RequestOptions&version=11.0.198
#tool nuget:?package=Soenneker.Cosmos.RequestOptions&version=11.0.198
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 | net11.0 is compatible. |
-
net11.0
- Microsoft.Azure.Cosmos (>= 3.63.3)
- 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 |
|---|---|---|
| 11.0.198 | 636 | 10/27/2026 |
| 11.0.197 | 278 | 10/27/2026 |
| 11.0.196 | 269 | 10/26/2026 |
| 11.0.195 | 278 | 10/26/2026 |
| 4.0.194 | 1,022 | 10/14/2026 |
| 4.0.193 | 92 | 10/14/2026 |
| 4.0.188 | 345 | 10/12/2026 |
| 4.0.187 | 203 | 10/12/2026 |
| 4.0.186 | 607 | 10/11/2026 |
| 4.0.185 | 1,335 | 9/30/2026 |
| 4.0.184 | 91 | 9/30/2026 |
| 4.0.182 | 163 | 9/30/2026 |
| 4.0.181 | 1,312 | 9/24/2026 |
| 4.0.180 | 718 | 9/18/2026 |
| 4.0.179 | 691 | 9/15/2026 |
| 4.0.178 | 970 | 9/12/2026 |
| 4.0.177 | 709 | 9/9/2026 |
| 4.0.176 | 2,958 | 8/30/2026 |
| 4.0.175 | 186 | 8/29/2026 |
| 4.0.174 | 3,010 | 8/7/2026 |
Remove redundant framework conditions