Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make DbContext release references to entities when they are removed or detached. #34987

Open
Camel-RD opened this issue Oct 26, 2024 · 0 comments

Comments

@Camel-RD
Copy link

Currently EF Core isn't releasing references when entities are removed from the context or detached. It probably doesn't matter when the context is recreated for each small unit of work, but in a winforms application, it would be preferable not to have to recreate the context every time some data needs to be reloaded. Before reloading data into DbSet I tried to clear it by setting the state Detached, but it doesn't work, memory isn't freed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant