Azure / azure-cosmos-dotnet-v3

.NET SDK for Azure Cosmos DB for the core SQL API
MIT License
723 stars 477 forks source link

invalid syntax for GetDatabase - closing paren is shown as closing square bracket #4526

Closed jsquire closed 3 weeks ago

jsquire commented 3 weeks ago

Issue Transfer

This issue has been transferred from the Azure SDK for .NET repository, #44375.

Please be aware that @zachz-microsoft is the author of the original issue and include them for any questions or replies.

Details

Type of issue

Typo

Description

Code snippet in article shows the following.

Database db = cosmosClient.GetDatabase("myDatabaseId"]; DatabaseResponse response = await db.ReadAsync();

the closing square bracket on the first line should be a closing paren

Database db = cosmosClient.GetDatabase("myDatabaseId"); DatabaseResponse response = await db.ReadAsync();

Page URL

https://learn.microsoft.com/en-us/dotnet/api/azure.cosmos.cosmosclient.getdatabase?view=azure-dotnet-preview

Content source URL

https://github.com/Azure/azure-docs-sdk-dotnet/blob/master/xml/Azure.Cosmos/CosmosClient.xml

Document Version Independent Id

937ff655-3950-fa5c-4b13-866185f4ba5e

Article author

@azure-sdk

Metadata

ealsur commented 3 weeks ago

This reported issue is for the Azure.Cosmos package, which is unlisted and deprecated.

The documentation for the correct package Microsoft.Azure.Cosmos is correct: https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.cosmosclient.getdatabase?view=azure-dotnet

Please do not use Azure.Cosmos.