I want to add a custom sitemap that populates data from a database.
It's based on this article:
http://msdn.microsoft.com/en-us/magazine/cc163657.aspx
The problem is that i don't want to break the BLL-DAL pattern.
In given example the overrided BuildSiteMap() function directly access database to retrieve data and I want to use already existing objects.
So I want to remove all database accessing part.
The problematic part is the Initialize SQL cache dependency and linking to SqlSiteMapProvider class .
HttpRuntime.Cache.Insert(_cacheDependencyName,
new object(), dependency,
Cache.NoAbsoluteExpiration,
Cache.NoSlidingExpiration,
CacheItemPriority.NotRemovable,
new CacheItemRemovedCallback(
OnSiteMapChanged));
If I use the existing classes (in dal and BLL), I don't know if it's possible to invoke call back from there.
I know that my question is not clear, so to summarize it:
I want to move all database related code to existing bll-dal calsses and still be able to use dependency.