我嘗試從Azure DocumentDB數據庫接收所有文檔。我找到了表明我的問題的例子,但它不起作用。 https://github.com/Microsoft/azure-docs/blob/master/articles/documentdb/documentdb-sharding.md#create-queries-against-all-collections-in-the-database從數據庫Azure DocumentDB接收所有文檔
我的代碼(C#):
var client = new DocumentClient(new Uri(endPointUrl), authorizationKey);
var database = await client.ReadDatabaseAsync(UriFactory.CreateDatabaseUri(DatabaseId));
var documents = client.CreateDocumentQuery(database.Resource.SelfLink).ToList();
我CreateDocumentQuery
例外:
消息:{ 「服務器無法解析URL」}; 錯誤:{{「code」:「NotFound」,「message」:「服務器無法解析URL」。 }};
那麼,我可以在一次查詢中從多個集合中接收文檔嗎?
非常感謝您的全面迴應。所以這就像我想的,但我不確定通過GitHub的信息。 – Pyotreq