Skip to content

Conversation

@alistairmatthews
Copy link
Contributor

Although in the Dashboard there is often an environment variable such as ConnectionStrings__postgresdb listed, this shouldn't be used in code for two reasons:

  • The double-underscore returns null and should be replaced with a colon.
  • We should always encourage the Aspire method instead: var connectionUri = builder.Configuration.GetConnectionString("postgresdb");

Fixes: #312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove code that uses the ConnectionStrings__<name> environment variable

1 participant