efcore icon indicating copy to clipboard operation
efcore copied to clipboard

How to fix up navigation collection without reloading?

Open andre9349 opened this issue 2 years ago • 1 comments

Hello. I have two navigation collections contains common entity inside. Atter I reloaded one of them, other navigation collection sill contains detached entity. I tried to fix it using ChangeTracker.DetectChanges() method, but unsuccessfully. How can I replace new entity in other collection without querying database? RefreshDetachedIssueSample.zip

andre9349 avatar Jan 26 '23 10:01 andre9349

This looks like a bug. The navigation for the other relationship is still holding on to the detached entity, rather than it being removed.

ajcvickers avatar Jan 27 '23 11:01 ajcvickers