-
Hi guys, I want to override my default connection string with the one generated by Aspire, but on the Aspire dashboard it's empty. Am I doing this correctly? `using Microsoft.Extensions.Configuration; var builder = DistributedApplication.CreateBuilder(args); var sql = builder.AddSqlServer("sql") var db = sql.AddDatabase("database"); var migrations = builder.AddProject<Projects.Nxt_MigrationService>("migrations") builder.AddProject<Projects.Nxt_Web>("nxt-web") builder.Build().Run(); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Like this. builder.AddProject<Projects.Nxt_Web>("nxt-web")
.WithReference(migrations)
.WaitFor(db)
.WithEnvironment("ConnectionStrings__DefaultConnection", db); |
Beta Was this translation helpful? Give feedback.
Like this.