Skip to content

Instantly share code, notes, and snippets.

@stefan-wegener
Created February 23, 2017 10:47
Show Gist options
  • Select an option

  • Save stefan-wegener/8c2eb9d5d98fe9e8b3b7f32bf27f6637 to your computer and use it in GitHub Desktop.

Select an option

Save stefan-wegener/8c2eb9d5d98fe9e8b3b7f32bf27f6637 to your computer and use it in GitHub Desktop.
ASP.NET Core Notes
Multiple environments with different DB connections:
Besides appsettings.json, create appsettings.development.json, appsettings.staging.json, appsettings.production.json and move your connections strings there.
In code:
cs: if (env.IsDevelopment()) { ... }
cshtml: <environment names="Development"> ... </environment>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment