For an existing database, the Aspire host can store its connection string under a named entry in the ConnectionStrings section of appsettings.json. The name passed to AddConnectionString must match that entry. section 3.1
"ConnectionStrings": {
"database": "<a valid SQL database connection string>"
}
Example appsettings.json entry for the name database. section 3.1
Pass the registered resource as a reference to the services that need it. Aspire service discovery resolves the connection string, so those services need not store it in their own settings. section 3.1
