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 ILazyLoader disposable #10640

Closed
ajcvickers opened this issue Jan 4, 2018 · 1 comment
Closed

Make ILazyLoader disposable #10640

ajcvickers opened this issue Jan 4, 2018 · 1 comment
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@ajcvickers
Copy link
Member

Because currently it relies on the context.IsDisposed flag, but this could given the wrong result in cases whether context pooling is being used.

@ajcvickers ajcvickers self-assigned this Jan 4, 2018
@ajcvickers ajcvickers added this to the 2.1.0 milestone Jan 4, 2018
@ajcvickers ajcvickers modified the milestones: 2.1.0-preview1, 2.1.0 Jan 17, 2018
@ajcvickers ajcvickers removed this from the 2.1.0 milestone Jan 27, 2018
@ajcvickers
Copy link
Member Author

This is fixed, but it doesn't help the pooling case since ILazyLoader is tied to EF's context scope, and that scope is not disposed when pooling is used. Discussed in triage and decided that this is okay because it requires entities to live beyond then end of the conceptual life of the context, use lazy loading, and use pooling all together, and even then the entities will probably just work if the context is still around. The workaround if needed is to explicitly detach entities before disposing the context.

@ajcvickers ajcvickers added this to the 2.1.0 milestone Jan 29, 2018
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jan 29, 2018
@ajcvickers ajcvickers modified the milestones: 2.1.0-preview2, 2.1.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

1 participant