We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We just merged dotnet/aspire#7826 into 9.2 which adds an overload of AddConnectionString that supports passing in a reference expression.
AddConnectionString
There are a few key things this enables:
Creating adhoc connection strings made from various parameters:
var openAiKey = builder.AddParameter("openaikey", secret: true); var oaiCs = builder.AddConnectionString("llm", ReferenceExpression.Create($"Endpoint=https://api.openai.com/v1;Key={openAiKey}"));
Appending to existing connection strings.
var builder = DistributedApplication.CreateBuilder(args); var postgres = builder .AddPostgres("postgres") var database = postgres.AddDatabase("db"); var cs = builder.AddConnectionString("database", ReferenceExpression.Create($"{database};Include Error Details=true")); var backend = builder .AddProject<Projects.Backend>("backend") .WithReference(cs) .WaitFor(cs); builder.Build().Run();
Waiting for a connection string will wait for the database implicitly.
This article should be updated to show the new scenarios.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We just merged dotnet/aspire#7826 into 9.2 which adds an overload of
AddConnectionString
that supports passing in a reference expression.There are a few key things this enables:
Creating adhoc connection strings made from various parameters:
Appending to existing connection strings.
Waiting for a connection string will wait for the database implicitly.
This article should be updated to show the new scenarios.
The text was updated successfully, but these errors were encountered: