Open seroche opened 4 years ago
The proxy class will never work after the entity retrieved from Cacheable. That's design limitation I imagine very hard to overcome.
My thoughts on this https://github.com/VahidN/EFSecondLevelCache.Core/issues/63 I guess you need either quit using lazy loading, either wait for EFCore changes to be able to disable proxy creation on will
Summary of the issue
Calling
Include
on anEFCachedDbSet
does not include the property as expected.Environment
Example code/Steps to reproduce:
I'm using the following entity extracted from my MSSQL DB.
In EF Core, the binding is created as followed:
Outputs
When I call the following code,
SubCategories
are allNULL
.If I move the include before the
Cacheable()
, then it works fine.I assume it's related to #39. It would convenient if we could call the
include
on theEFCachedDbSet
. This way we can keep the Cache mgt code within one class (the DbContext)