microsoft / microsoft/aspire-samples

Add sample to use Aspire with CosmosDB

Open
#74 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area-samples
Dominant language
C#
Stars
1.2k
Forks
345
Avg merge
3d 13h
Merged PRs (30d)
30

Description

I would appreciate if there was a sample showing how to use CosmosDB in Aspire since this simple setup isn't working and I have no clue on what's missing.

var builder = DistributedApplication.CreateBuilder(args);

var db = builder.AddAzureCosmosDB("db");

var api = builder.AddProject<Projects.API>("api")
    .WithReference(db);

builder.Build().Run();

See: https://github.com/dotnet/aspire/issues/1502

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing sample structure in this repository and the related discussion in dotnet/aspire#1502. Add a C# sample demonstrating Aspire with Azure Cosmos DB and the shown project reference setup. Done means the sample runs and clearly shows the missing configuration needed for this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
cloud, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.