Config API, adding new connection string
Hi,
I tried to add new connection string using API. So far I've for the following:
var conStrings = Config.Get<DataConfig>().ConnectionStrings;
if
(!conStrings.ContainsKey(
"Sitefinity4"
))
Config.UpdateSection<DataConfig>(config =>
config.ConnectionStrings.Add(
new
ConnStringSettings(<?????>,
"Sitefinity4"
,
"data source=localhost;Integrated Security=SSPI;initial catalog=db_name"
)));
Is Config.UpdateSection<DataConfig> right function to update DataConfig file? And what should I pass instead <??????>. Thanks, Denis.