Difference in using the second overloaded method and first method from CosmosClient
Hi, I am trying to understand what's the difference in using the second overloaded method in CosmosClient compared to just supply the connection string using the first overloaded method of CosmosClient? I understand that the second requires me to provide the endpoint uri and primary key, but why is there a need for the second overloaded method if
CosmosClient(string connectionString, CosmosClientOptions clientOptions = null)
already simplifies my work. Is there a reason(s) that I should be using the second one? Note that I am using the latest Azure CosmosDB SDK v3 for my ASP.NET Core 7 application.5 Replies
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Sorry, forgot to provide the code section I was referring to:
From CosmosClient.cs:
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Yeah I take it that that is for the primary key. But, I can also just connect using the first method by providing the connection string, which works just as fine for me, so I don't get the point of the second overloaded method, unless it is for explicitness and flexibility?
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View