Tip #2 says "Call OpenAsync to avoid startup latency on first request". However, this method no longer exists on DocumentClient.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@mmulhearn Thank you for this detailed feedback. I am assigning this to the content owner (@SnehaGunda) to evaluate and update as appropriate.
@mmulhearn which version of the .Net SDK are you using? the OpenAsync method is available here is the reference doc: https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.client.documentclient.openasync?view=azure-dotnet
@SnehaGunda I am using Microsoft.Azure.DocumentDB v1.22.0
I realized I wasn't using the latest so I updated to 2.2.1 and OpenAsync is also not found on DocumentClient in that version, either.
@mmulhearn thanks for clarifying, the doc uses DocumentClient where as the example in reference doc uses IDocumentClient interface to initialize the client object, can you check if this works?
using (IDocumentClient client = new DocumentClient(new Uri("service endpoint"), "auth key"))
{
await client.OpenAsync();
}
@SnehaGunda No, that does not work.
The issue seems to be a two-fold:
@SnehaGunda Could you please provide update on the above issue?
@mmulhearn sorry about the long delay, we have verified that the 2.2.1, 2.2.2.. versions have OpenAsync() method. Yes it's a method on DocumentClient not IDoucmentClient. In the above example await client.OpenAsync();" client is a DocumentClient object and we are calling the method on it. If you find it in DocumentClient you are good.
If you don't have any further questions we will close this issue.
@SnehaGunda It looks like the documentation was updated. We can close this.