I get a lot of errors when adding data to my Azure SQL server like this:
An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using
I can see on following link you can implement an azure strategy:
https://docs.microsoft.com/en-us/ef/ef6/fundamentals/connection-resiliency/retry-logic
In the article it is illustrated that you can use a standard Azure strategy:
public class MyConfiguration : DbConfiguration
{
public MyConfiguration()
{
SetExecutionStrategy("System.Data.SqlClient", () => new SqlAzureExecutionStrategy());
}
}
However it isent described how you apply it to your DbContext. Anyone tried this and can share som experience? It is not the core version, and it is implemented in a function. Out of 9000 call around 1000 fails so it a lot of errors.