[FEATURE REQ] Support for CosmosClient in AddAzureClients
See original GitHub issueLibrary name
Microsoft.Extensions.Azure
Please describe the feature.
Coming from https://github.com/Azure/azure-cosmos-dotnet-v3/issues/4002, I have been sent here.
The following extension is useful and neat, it would work like this for Blob Storage
builder.Services.AddAzureClients(options =>
{
//Add storage accounts
options.AddBlobServiceClient(i"blabla").;
// Use DefaultAzureCredential by default
options.UseCredential(new DefaultAzureCredential());
});
I wonder if we can add something like AddCosmosServiceClient
?
I did not find it in the docs.
Issue Analytics
- State:
- Created 2 months ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Dependency injection with the Azure SDK for .NET
Learn how to use dependency injection with the Azure SDK for .NET client libraries.
Read more >How to add CosmosDB to .Net 6 WebAPI?
In .Net 6.0, you should add `CosmosClient` in your `Program.cs` file like below sample code. using Microsoft.Azure.Cosmos; using Microsoft.
Read more >Azure Cosmos DB SQL API client library for Python
Interaction with Cosmos DB starts with an instance of the CosmosClient class. You need an account, its URI, and one of its account...
Read more >Working with CosmosClient in Azure Functions
In this article, you will learn how you can use the new CosmosClient within your Azure Functions to leverage the Azure Cosmos DB...
Read more >Using Managed Identities to authenticate with Azure Cosmos DB
We can use this identity to authenticate with any service in Azure that supports Azure AD authentication without having to manage credentials.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @jsquire 💯
Hi @Ponant. This extension would need to be defined in the Cosmos package where the client is defined. Unfortunately, as that means in the Cosmos repository where the original issue was opened. I’ve responded to that issue directly to let the Cosmos team know.