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

Allow DbContextFactory to use a pool #21431

Merged
merged 1 commit into from
Jun 28, 2020
Merged

Allow DbContextFactory to use a pool #21431

merged 1 commit into from
Jun 28, 2020

Conversation

ajcvickers
Copy link
Member

Fixes #21247

Refactors the context pooling code to create a cleaner responsibility of services.

Has the same restrictions as regular pooling since the context instances are reused.

@ajcvickers ajcvickers requested review from AndriySvyryd and a team June 27, 2020 21:42
Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the leases structs to reduce allocations

@AndriySvyryd
Copy link
Member

You'd also need to collapse them into one type and get rid of the interface to avoid boxing

@ajcvickers
Copy link
Member Author

@AndriySvyryd New version up.

Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be easier to review as separate commits

Fixes #21247

Refactors the context pooling code to create a cleaner responsibility of services.

Has the same restrictions as regular pooling since the context instances are reused.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement an IDbContextFactory that pools context instances
2 participants