Last active
October 20, 2020 06:15
-
-
Save PradeepLoganathan/3ce63e71aa9e148f08e02994a62bdfb6 to your computer and use it in GitHub Desktop.
Creating the cosmos container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task CreateContainerAsync() | |
{ | |
ContainerProperties containerProperties = new ContainerProperties() | |
{ | |
Id = Guid.NewGuid().ToString(), | |
PartitionKeyPath = "/CustomerId", | |
IndexingPolicy = new IndexingPolicy() | |
{ | |
Automatic = false, | |
IndexingMode = IndexingMode.Lazy, | |
} | |
}; | |
this._container = await this._database.CreateContainerIfNotExistsAsync(containerProperties); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment