Last post Jul 18, 2017 07:50 AM by PatriceSc
Jul 18, 2017 07:40 AM|kourosh23|LINK
I am caching a list into my program. The list has navigation properties to other complex objects. Complex objects are loaded sometimes, sometimes they are not. I mean some objects are filled in the list properly with depth more than one, sometimes the same
list is not loaded with those objects.
It happens for example when I build my application and re-run the project.
I was wondering why?
Does it have to do with lazy-loading? or it is my db connection management? or it is something else?
The properties with depth 1, ie simple types, are loaded fine, always.
Jul 18, 2017 07:50 AM|PatriceSc|LINK
Yes for now it seems a lazy loading issue (ie what is loaded depends on what you actually used when placed in cache).
Try to explicitely load the related data you want to cache using for example Include: see
Mare sure also to not abuse the cache (ie ending up loading a bunch of related data that won't be used often).