When working with Entity Framework or EntityFramework Core, there needs to be a way to skip the implicit call to SaveChanges or SaveChangesAsync
Proposed options:
Option 1 - New IImmediateRepository and IReadOnlyImmediateRepository interfaces to support the immediate save changes
Example:
// currently
await _thingsRepo.AddAsync(newThing);
// instead
await _thingsRepo.AddImmediateAsync(newThing);
Where the existing methods will not immediately call for SaveChanges until UpdateAsync is called
Option 2 - optional parameter to apply immediately
// currently applying immediately
await _thingsRepo.AddAsync(newThing);
await _thingsRepo.AddAsync(newThing, applyImmediately: true);