CosmosDbContextOptionsBuilder.ContentResponseOnWriteEnabled(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Entity Framework