Right now the dbup.yml allows us to directly specify a connection string or pull the connection from an environment variable.
How do you feel about pulling the connection string from the AppSettings.config?
The main motivation here would be to reduce duplication of connection strings. It'd be nice if there was just one source of truth for the connection string, and the default convention for .NET Core is to put it in the AppSettings.json.
Facil is an example of how this can be configured.
Basically, they have a configs section that translates into Microsoft.Extensions.Configuration.ConfigurationBuilder.Add calls, which allows the user to flexibly specify priority between config files, user secrets, and environment variables.
We wouldn't necessarily need to get that fancy, but Microsoft.Extensions.Configuration would make it fairly easy to have that level of flexibility.
Right now the dbup.yml allows us to directly specify a connection string or pull the connection from an environment variable.
How do you feel about pulling the connection string from the AppSettings.config?
The main motivation here would be to reduce duplication of connection strings. It'd be nice if there was just one source of truth for the connection string, and the default convention for .NET Core is to put it in the AppSettings.json.
Facil is an example of how this can be configured.
Basically, they have a
configssection that translates intoMicrosoft.Extensions.Configuration.ConfigurationBuilder.Addcalls, which allows the user to flexibly specify priority between config files, user secrets, and environment variables.We wouldn't necessarily need to get that fancy, but
Microsoft.Extensions.Configurationwould make it fairly easy to have that level of flexibility.