Situation is like this: I have two projects. One Asp.net and one project which does all data related stuff with database. I keep my connectionstring in a seperate encrypted XML file. Now instead of requesting all data constantly from sql. I want to use SqlCacheDependency to gain performance. If I follow the instruction they advice me to add a database name in web.config.
<caching>
<sqlCacheDependency enabled ="true">
<databases>
<add name="dbName" connectionStringName="connectionstringName" />
</databases>
</sqlCacheDependency>
</caching>
Is there any way to this in code. Like in Application Application_Start() event in global.asax file where I can link to a custom method that provides me that connectionstring?
Thanks in advance