I and my team are currently doing a project using Entity Framework Core (Database First) with an ASP.NET Core 2.2 web server generated (with some modification) from an OAS 3.0 YAML definition file in SwaggerHub. The server accesses an Azure SQL Database, retrieving the connection strings from an Azure Key Vault. This works, but now we want to be able to test on a test database without disturbing our primary database. Later there will be additional QA or Staging versions of the database as we extend for CI/CD. We want to get started right.
For now, how do we handle switching just the database? We want a solution that is semi-automatic (at least), so we don't have to fiddle around with recompiling/publishing the server each time we need to test. With a lot of searching I've been unable to find an example that does this.
This is similar to the question asked at Development and Production databases except that we are using an Azure Key Vault instead of .config files to hold the connection strings.
Aug 27 – I have set up a second Azure Key Vault for Dev purposes (that at least is recommended). That requires only the key vault access code in the server to change. It requires publishing the server to Azure, so it's not a full solution yet.