Working with desktop app using Entity Framework Core demonstrate several ways to configure a connection string.
Each developer will have a bias to which way to go and that there may be room for improvement.
microsoft.extensions.configuration
microsoft.extensions.configuration.binder
microsoft.extensions.configuration.FileExensions
microsoft.extensions.configuration.Json