Repository navigation
Split reading work entries from writing them in a unit of work - #174
Merged
Merged
Conversation
vesnicancz
force-pushed
the
refactor/work-entry-intents
branch
from
November 4, 2026 22:28
19e059d to
347ba54
Compare
vesnicancz
force-pushed
the
refactor/work-entry-reader
branch
from
November 4, 2026 22:28
37e2e68 to
52c8071
Compare
WorkEntryRepository no longer has two modes, and writes outside of a transaction no longer compile.
vesnicancz
force-pushed
the
refactor/work-entry-reader
branch
from
November 4, 2026 22:34
52c8071 to
dbc93f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on #172. Now that every write runs in a unit of work,
WorkEntryRepositoryno longer needs its two modes, one opening a context per call and saving, the other sharing one and leaving the save to the unit of work. Nothing used the first for writes anymore, but everything could.IWorkEntryReaderis whatWorkEntryServiceand others use for reads outside a transaction.WorkEntryReaderopens its own context per read and is what DI registers.IWorkEntryRepositoryextends it with the writes and exists only inside a unit of work. It can't be resolved from DI anymore, so a write outside a transaction doesn't compile rather than just being discouraged.WorkEntryQueries.ContextScopeis gone.CancellationTokenwithout a default, and so do the repository methods.No behaviour change and no database change. New
WorkEntryReaderTestsrun on SQLite rather than the EF in-memory provider, so the queries get translated as they do in the application. Whole solution passes.