I want to ensure that when I do a context.SaveChanges(), this is retried because the database might be temporarily down.
So far all I've found involves writing a lot of code that I'd then need to maintain, so is there something ready, an out-of-the-box tool, that I can use for resiliency?
I've created a small library called
ResilientSaveChanges.EFCorethat allows resilientcontext.SaveChanges/SaveChangesAsyncin Entity Framework Core, logging of long-running transactions and limiting of concurrent SaveChanges. It's straight to the point.Available on GitHub and NuGet. Tried and tested in production on multiple private projects.