c# - specify appsettings while adding database migration -
appsettings
files
appsettings.json
appsettings.production.json
appsettings.test.json
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
Post a Comment