Skip to content

Instantly share code, notes, and snippets.

View kr-santosh's full-sized avatar

Santosh Kulkarni kr-santosh

  • Microsoft
  • Bengaluru,India
View GitHub Profile
@kr-santosh
kr-santosh / AeCosmosDB-CreateQueryDefinition.cs
Last active July 28, 2021 07:49
Query Demo always encrypted Azure Cosmos DB
// Query Demo.
// Here SubTotal and OrderDate are encrypted properties.
QueryDefinition withEncryptedParameter = containerWithEncryption.CreateQueryDefinition(
"SELECT * FROM c where c.SubTotal = @SubTotal AND c.OrderDate = @OrderDate");
await withEncryptedParameter.AddParameterAsync(
"@SubTotal",
order2.SubTotal,
"/SubTotal");