Add the binary, or the project in the link above to your solution, and add the reference to your project.
Instantiate a retry policy with suitable parameters:
var retryPolicy = new RetryPolicy<SqlAzureTransientErrorDetectionStrategy>(
10,
TimeSpan.FromSeconds(0.5),
TimeSpan.FromSeconds(2)
) { FastFirstRetry = true };
Use your retry policy object for any atomic work on the context.
using(var context = new ... )
{
...//Maybe you do something to the database...
retryPolicy.ExecuteAction(() => context.SaveChanges());