Adding new provider API
Hi,
I'm trying to add new provider from code. That is what I have so far:
var providers = Config.GetManager().GetSection<LibrariesConfig>().Providers;
if
(!providers.ContainsKey(
"ww4Images"
))
providers.Add(
new
DataProviderSettings(providers)
Name =
"ww4Images"
,
Title =
"WW Images"
,
Description =
"WW images hosted on Sitefinity 4"
,
ResourceClassId =
typeof
(LibrariesResources).Name,
ProviderType =
typeof
(Telerik.Sitefinity.Modules.Libraries.Data.OpenAccessLibrariesProvider),
Parameters =
new
NameValueCollection()
"applicationName"
,
"/Images"
,
"connectionName"
,
"Sitefinity4"
,
"connectionString"
,
"Sitefinity4"
);
What do I need to add to my code in order to update sitefinity configuration files to remember new provider?
Thanks, Denis.
Hi,
Please review the following forum post where you will find useful information.
Greetings,
Stefani Tacheva
the Telerik team