Skip to content
Discussion options

You must be logged in to vote

Generally, the pain point here became "scope". EF requires that we use a scoped lifetime. That means everything that depends on that transaction provider has to use a scoped lifetime.

A scoped command processor creates pain points around caching pipelines and producers. Now we can offload those to something that holds the singleton, etc. But generally, because we are often downstream of ASP.NET, with no control over the scope, we don't benefit from that scope in the same way that ASP.NET does; it is just propagated to us. It is much easier for us to declare the handlers as having a scoped lifetime and take that dependency.

We tried the "just inject into the CP strategy," but our experienc…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
2 replies
@jakoss
Comment options

jakoss Nov 7, 2025
Collaborator Author

@iancooper
Comment options

Comment options

You must be logged in to vote
9 replies
@jakoss
Comment options

jakoss Nov 7, 2025
Collaborator Author

@iancooper
Comment options

Answer selected by jakoss
@jakoss
Comment options

jakoss Nov 7, 2025
Collaborator Author

@jakoss
Comment options

jakoss Nov 18, 2025
Collaborator Author

@iancooper
Comment options

@jakoss
Comment options

jakoss Nov 18, 2025
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants