Closed sameer-kumar closed 1 year ago
@martintmk Maybe we should include a sample for this scenario for v8?
My vote would be to put this in https://github.com/App-vNext/Polly-Samples
I'm also very interested in finding a reference implementation for using Polly with EF Core. I've been looking to integrate a circuit breaker pattern in EF Core, specifically for handling SQL downtimes. I noticed @martincostello that you've added this to the Polly v8.0.0 milestone, which is 96% complete but still open. I'm eagerly awaiting this example. If anyone has a temporary solution or guide on how to manually handle SQL connections for circuit breaking, it would be greatly appreciated. Thanks everyone!
You can check the #1425 pull request where I experimented on how to leverage Polly V8 with Entity Framework Core.
Ultimately it served only as an exercise as it is very library-specific to be in this repo.
However, you can take an inspiration from it.
Summary: What are you wanting to achieve? I'm looking for inputs and hopefully some reference implementation to use Polly with EF Core 3.1. My AspNetCore application uses Azure SQL with EF and repository pattern. I want to use Polly with RetryAndWait policy for Azure SQL requests beginning with initial connection. I have read that EF Core 3.1 supports EnableRetryOnFailure execution strategy on DbContext. However, I want to see if I can use Polly instead to be consistent with other areas of my application like webApi calls.
What code or approach do you have so far?
I tried google but couldn't find anything. So not sure if I'm thinking on right lines or its completely absurd.
Any insights or feedback is appreciated. Thanks!