With each EF version there was a different way to get an underlying object for a proxy. None of the old tricks work using EF core 2.2. I referenced Castle.Core which EF uses and called ProxyUtil.GetUnproxiedInstance but that just returns the proxy again as already noted in below article. NONE of the suggestions there work. NOTE ! I need the instance, not the type which I can easily get via BaseType.
Asked
Active
Viewed 299 times