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

Find a better fix for reloading an Entity. #42

Open
metalglove opened this issue Aug 24, 2019 · 1 comment
Open

Find a better fix for reloading an Entity. #42

metalglove opened this issue Aug 24, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@metalglove
Copy link
Member

When updating entities in the DbContext (with LazyLoading enabled) the Local version of the DbContext.Set<TEntity> is not up-to-date.

A way to fix this is to have every entity in the entity graph to be detached after an UpdateAsync call. This way the DbContext will clear those entities from the cache and will fetch them anew on the next query.

Work in progress:

public static class DbContextExtensions

@metalglove metalglove added the bug Something isn't working label Aug 24, 2019
@metalglove metalglove self-assigned this Aug 24, 2019
@metalglove
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant