Mid From PDF Azure Microsoft Azure

How do you enable consistency levels in Cosmos DB?

  • Cosmos DB supports Strong, Bounded Staleness, Session, Consistent Prefix,

Eventual.

  • Set consistency when creating CosmosClient:
var clientOptions = new CosmosClientOptions
{

ConsistencyLevel = ConsistencyLevel.Session

};

var cosmosClient = new CosmosClient(endpointUri, primaryKey,

clientOptions);

More from Microsoft Azure Tutorial

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details