-
Notifications
You must be signed in to change notification settings - Fork 480
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
Remove With methods that take a connection string #62
Comments
I was going to suggest something like this. When I was looking at setting up manifest publishing I was considering that I would have to inject a placeholder Redis component (for example) to hold the connection string so that it could get emitted to manifest. I think that this is a good suggestion. |
@davidfowl suggested offline that we stick with I'll start working on this tomorrow after my current change is done. |
One question, we currently have |
We talked about this. We are purposefully going to leave However, I don't think there was consensus on whether the new method would be |
I think one step at a time is fine, i.e. let's do this with the existing |
I think we may eventually land on a single name but lets get to the end and make all of the consumption consistent (connection strings and names of resources). We're landing in a really good place here with respect to the pattern. |
Instead, add new Add overloads that take a connection string to an existing server. Fix #62
I would prefer just having |
* Remove ConnectionString on With methods in Hosting App Model Instead, add new Add overloads that take a connection string to an existing server. Fix #62 * Respond to PR feedback - Write the connectionString to the manifest if it is provided. - Use DistributedApplicationException
Instead, when connecting to an existing resource that the DevHost doesn't manage, the connection string should be passed to the
.AddXXX
method when defining the component. The the.WithXXX
methods only take the component and optionally aconnectionName
.For example, today we have:
We just need the first method. And then the Add method:
Would get an overload for directly connecting to an existing Redis instance:
One design decision: We could name this new method
Use
instead ofAdd
. Ex. instead ofbuilder.AddRedis("cache", "localhost:3679")
, we could havebuilder.UseRedis("cache", "localhost:3679")
.@DamianEdwards @davidfowl @mitchdenny
The text was updated successfully, but these errors were encountered: