Hands-on lab/lab-files/TransactionGenerator/Program.cs
/// <summary>
/// Get the container if it exists, null if it doesn't.
/// </summary>
/// <returns>The requested container</returns>
Get the container if it exists, null if it doesn't.
Get the container if it exists null if it doesn ' t .
private static Container GetContainerIfExists(string databaseName, string containerName)
        {
            var database = _cosmosDbClient.GetDatabase(databaseName);
            return database?.GetContainer(containerName);
        }
private static Container GetContainerIfExists ( string databaseName , string containerName ) { var database = _cosmosDbClient . GetDatabase ( databaseName ) ; return database ? . GetContainer ( containerName ) ; }
Get the container if it exists, null if it doesn't.
Get the container if it exists null if it doesn ' t .
The requested container
The requested container
databaseName
string
containerName
string