Skip to content

Instantly share code, notes, and snippets.

@shinkathe
Created February 21, 2018 15:33
Show Gist options
  • Save shinkathe/7f5440f98504465bd09bb9c8f0c70c2c to your computer and use it in GitHub Desktop.
Save shinkathe/7f5440f98504465bd09bb9c8f0c70c2c to your computer and use it in GitHub Desktop.
Application allows for smart defaults
public string DbConnectionString => Environment.GetEnvironmentVariable("DB_CONNECTIONSTRING")
?? _configuration.GetConnectionString("DB_CONNECTIONSTRING")
?? "DevelopmentEnvironmentConnectionString";
public string BasicAuthUserName => Environment.GetEnvironmentVariable("BASICAUTH_USERNAME")
?? _configuration["BasicAuth:Username"]
?? "admin";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment