CosmosDbContextOptionsBuilder.ContentResponseOnWriteEnabled(Boolean) Method

Definition

Sets the boolean to only return the headers and status code in the Cosmos DB response for write item operation like Create, Upsert, Patch and Replace. Setting the option to false will cause the response to have a null resource. This reduces networking and CPU load by not sending the resource back over the network and serializing it on the client.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder ContentResponseOnWriteEnabled (bool enabled = true);
abstract member ContentResponseOnWriteEnabled : bool -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
override this.ContentResponseOnWriteEnabled : bool -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
Public Overridable Function ContentResponseOnWriteEnabled (Optional enabled As Boolean = true) As CosmosDbContextOptionsBuilder

Parameters

enabled
Boolean

false to have null resource

Returns

Remarks

See Using DbContextOptions, and Accessing Azure Cosmos DB with EF Core for more information and examples.

Applies to