Currently the SqlFeatureToggle requires a connection string / connection string name and a SQL statement per toggle.
When multiple toggles are implemented it would be nicer to be able to provide a generic SqlFeatureToggle connection string / connection string name and SQL statement - this can be selected as a fallback so that the specific keys are selected, then the generic one.
Instead of the following:
<add key="FeatureToggle.MyAwesomeFeature1.ConnectionStringName" value="Database" />
<add key="FeatureToggle.MyAwesomeFeature1.SqlStatement" value="select Value from Toggle where ToggleName = 'MyAwesomeFeature1'"/>
<add key="FeatureToggle.MyAwesomeFeature2.ConnectionStringName" value="Database" />
<add key="FeatureToggle.MyAwesomeFeature2.SqlStatement" value="select Value from Toggle where ToggleName = 'MyAwesomeFeature2'"/>
<add key="FeatureToggle.MyAwesomeFeature2.ConnectionStringName" value="Database" />
<add key="FeatureToggle.MyAwesomeFeature2.SqlStatement" value="select Value from Toggle where ToggleName = 'MyAwesomeFeature3'"/>
Have this:
<add key="FeatureToggle.SqlFeatureToggle.ConnectionStringName" value="Database" />
<add key="FeatureToggle.SqlFeatureToggle.SqlStatement" value="select Value from Toggle where ToggleName = '{name}'"/>
Currently the SqlFeatureToggle requires a connection string / connection string name and a SQL statement per toggle.
When multiple toggles are implemented it would be nicer to be able to provide a generic SqlFeatureToggle connection string / connection string name and SQL statement - this can be selected as a fallback so that the specific keys are selected, then the generic one.
Instead of the following:
Have this:
I can submit a PR if required.