Database Connection dialog and multiple appsettings files

I'm using the latest Radzen Blazor Studio (v1.9.9).

I've added a table to my development database, and am now trying to use the "Data" feature to have Studio scaffold out the entities.

When the "Create or update a database connection" dialog appears, I see my existing database, but I have multiple appsettings files, and Studio is scanning one other than my development database, as my new table doesn't appear.

  1. How does Studio determine which appsettings file to reference?
  2. Could the file being used / referenced be indicated somewhere in the dialog?

Hi @DB1234,

At the moment the order is determined entirely by the filesystem which is wrong. We are requesting all "appsettings*.json files and this isn't ideal.

We will change that to adhere to the default .NET conventions which are:

config.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
      .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true);

and we will use Development as the default environment name. In short during development the connection string defined in appsettings.Development.json should take precedence.

1 Like