我想像这样使用DocumentClient在代码中创建一个Collection
await client.CreateDocumentCollectionAsync (
UriFactory.CreateDatabaseUri(databaseId),
new DocumentCollection { Id = collectionId },
new RequestOptions { OfferThroughput = 1000 }
);
Run Code Online (Sandbox Code Playgroud)
但是,我该如何添加PartitionKey?在CosmosDB仿真器中,我只是在类的集合中添加属性的名称。不能解决。可能是我在这里错过了一些基本的东西。谢谢