-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
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
The argument for AddDatabase represents a database and a connection string name at the same time #1199
Comments
Are you going to make this change @sebastienros ? |
I am willing to, was waiting for some kind of triage before, and maybe comments. |
@davidfowl I don't think it an ship in next preview, right? |
any news ? |
We should do this for next preview. Thoughts @mitchdenny? |
I think we need to do this (created an issue recently for the same thing). Next preview seems fine. I think the usage of IResource.Name is quite pervasive so each usage will have to be scrutinized, especially where connection strings are concerned. There is a related aspect to this in the context of the proposed metadata field (#1619). For cloud deployment tools we may wish to have a different resource name than that specified in the app model - especially when approaching brownfields work. |
@sebastienros are you still working on this? Loop in @ellismg for the AZD side of things. |
Yes I will work on that very soon. |
Let's take this example for PostgreSQL:
"catalogdb"
is both the name of the database (a technical name), and the name of the resource (a logical name).As a developer when I read
AddDatabase(string name)
I understand that is can be a database name, as inCREATE DATABASE "catalogdb"
.But in the app when I do
builder.AddNpgsqlDbContext<CatalogDbContext>("catalogdb")
it's asking for aconnectionName
.Though the documentation for AddDatabase(string name) is clear:
It seems like we should be able to provide a database name and a resource name (or connection string name), because we might want them to be different, or change independently.
The
name
argument should also be changed to remove the ambiguity.The text was updated successfully, but these errors were encountered: