-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Reuse ExecutionStrategy instance #21350
Comments
I'd be happy to try and pick this up if you could provide a little more detail about the intended design for storing a strategy in the DbContext. |
Add a field to To encapsulate the field add an interface with a property in |
Alternatively, you can store it in the |
The latter approach has better separation of concerns and avoids having to add yet another interface. |
Looking at the code, I don't quite follow the second suggestion. Maybe the new field could be added to efcore/src/EFCore/Infrastructure/DatabaseFacade.cs Lines 266 to 267 in 86c2ad8
|
Ah, but then It's not obvious to me what the best place to funnel all the calls through to maximise re-use would be. |
Yes, that's why it needs to be set from the
Separate implementations is not a downside. For example, |
It can be stored in the
DbContext
The text was updated successfully, but these errors were encountered: