investigate if we can intercept saving changes in EF to catch changes to the model
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 14
- Forks
- 4
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
This could mean that the dev provides a diff callback for each type which returns a list of changes. But otherwise using it would look just like using EF normally. Here's what this might look like
public IEnumerable<IChange> Diff(Word? oldWord, Word newWord)
{
if (oldWord is null) return [new NewWordChange(newWord.Id, newWord.Text, newWord.Note)];
//etc...
}
public async Task CreateWord(Word word)
{
DbContext.Set<Word>().Add(word);
await DbContext.SaveChangesAsync();
}
we would just need to intercept the save event then call the Diff method defined by the user.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked EF Core save-changes interception documentation and the DbContext/SaveChangesAsync flow shown in the issue. Determine whether a user-supplied per-type Diff callback can be invoked for added, modified, and deleted entities while preserving normal EF usage; no repository files or tests are named, so done means a documented feasibility decision and scoped follow-up.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100