c# - specify appsettings while adding database migration -


appsettings files

  1. appsettings.json
  2. appsettings.production.json
  3. appsettings.test.json
  4. appsettings.debug.json

all specific environment first common settings.

appsettings.json file not contain connection string, since each environment has own db.

running add-migration mig-1 complains that

could not find connection string named 'connectionstring'.

how can specify connection string taken appsettings.test.json instead of default 1 (appsettings.json)

found answer in docs

add-migration mig-1 -e test     

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -