jason-roberts / FeatureToggle

Simple, reliable feature toggles in .NET
http://dontcodetired.com/blog/?tag=/featuretoggle
Apache License 2.0
689 stars 111 forks source link

Allow user to specify name of existing connection string for SqlFeatureToggle #97

Closed craig-wagner closed 9 years ago

craig-wagner commented 9 years ago

The connection string can now be specified three ways...

Entirely in <appSettings> (existing functionality):

<appSettings>
    <add key="FeatureToggle.MyFeatureToggle.ConnectionString" value="Data Source=..." />
</appSettings>

Entirely in <connectionStrings> (existing functionality as of 3.1):

<connectionStrings>    
    <add name="FeatureToggle.MySqlServerToggleFalse" connectionString="Data Source=..." />    
</connectionStrings>    

By specifying name of existing connection string in <connectionStrings> in the <appSettings> (new functionality):

<connectionStrings>
    <add name="primary" connectionString="Data Source=..." />
</connectionStrings>

<appSettings>
    <add key="FeatureToggle.MyFeatureToggle.ConnectionStringName" value="primary" />
</appSettings>
jason-roberts commented 9 years ago

Thanks @craig-wagner :)

jason-roberts commented 9 years ago

ps. @craig-wagner congrats on your first open source contributions!