We have a project that was implemented in linq to sql and is being migrated to LLBLGenPro runtime using the adapter pattern.
The first version of the app did a huge amount of caching, placing entire tables into the httpcache and then doing all the linking in the codebehind. (sigh)
So you get something like :
from p in MyCacheObject.ProductPages
join cmpp in MyCacheObject.ProductContentMemberships on p.ProductPageId equals cmpp.ProductContentId
join pl in MyCacheObject.ProductPlans on cmpp.ProductLinkId equals pl.ProductPlanId
Now, in our new repository pattern, I can build such joins with prefetch paths. You just call myRepository.GetProductPagesWithContentMemberships() and get a ProductPage entity with a collection of ProductContentMemberships.
That's great when we are talking to the db, but how do I sometimes pull from a collection of cached entities? I want to cache the tables and then use them to build my complex objects.
I can make "get from cache" vs "get from db" a decision that the repo can make, but I'm hoping I don't have to write two entirely different implementations of GetProductPagesWithContentMemberships(): one to get from db and one to use the cache.
I'm hoping there is some kind of magic adapter that I can use that will execute my linq against an object cache instead of sending it to SQL server. Is there such a thing?
This post: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=6265 hints that it is possible, but that's it.