.NET - Create a Database
Learn how to create a Cosmos DB database and container using the .NET SDK.
using Azure.Cosmos;
var client = new CosmosClient(endpoint, key);
var db = await client.CreateDatabaseIfNotExistsAsync("SampleDB");
var container = await db.Database.CreateContainerIfNotExistsAsync("Items", "/partitionKey");
View Details »