diff --git a/src/Microsoft.AspNet.ConfigurationModel/Sources/EnvironmentVariablesConfigurationSource.cs b/src/Microsoft.AspNet.ConfigurationModel/Sources/EnvironmentVariablesConfigurationSource.cs index e02862a..5097aa2 100644 --- a/src/Microsoft.AspNet.ConfigurationModel/Sources/EnvironmentVariablesConfigurationSource.cs +++ b/src/Microsoft.AspNet.ConfigurationModel/Sources/EnvironmentVariablesConfigurationSource.cs @@ -7,6 +7,7 @@ namespace Microsoft.AspNet.ConfigurationModel.Sources public class EnvironmentVariablesConfigurationSource : BaseConfigurationSource { private readonly string _prefix; + private static readonly string AzureConnStrPrefix = "SQLAZURECONNSTR_"; public EnvironmentVariablesConfigurationSource(string prefix) { @@ -22,6 +23,9 @@ namespace Microsoft.AspNet.ConfigurationModel.Sources { ReplaceData(Environment.GetEnvironmentVariables() .Cast() + .Select(entry => + ((string)entry.Key).StartsWith(AzureConnStrPrefix, StringComparison.OrdinalIgnoreCase) ? + new DictionaryEntry(((string)entry.Key).Substring(AzureConnStrPrefix.Length), entry.Value) : entry) .Where(entry => ((string)entry.Key).StartsWith(_prefix, StringComparison.OrdinalIgnoreCase)) .ToDictionary( entry => ((string)entry.Key).Substring(_prefix.Length),