Could anyone guide me how to implement a retry policy with EF to SQL Azure, please.
I am using the Transiet Fault Handling Framework, provided in lue of a better solution by EF team.
var retryPolicy = new RetryPolicy(
10,
TimeSpan.FromSeconds(0.5),
TimeSpan.FromSeconds(2)
) { FastFirstRetry = true };
context. using(var context = new ... )
{
...//Maybe you do something to the database...
retryPolicy.ExecuteAction(() => context.SaveChanges());
}