Open layris3 opened 4 years ago
how to use connection resiliency?
1\ create a class in your assembly that derives from the DbConfiguration class 2\ set the configuration
public class SchoolConfiguration : DbConfiguration
{
public SchoolConfiguration()
{
SetExecutionStrategy("System.Data.SqlClient", () => new SqlAzureExecutionStrategy());
}
}
it is common to occur trasient errors when we access the database which is in cloud. the best way to solved this issue is just to try the access again and again.
we could use the "connection resiliency",which is the new feature of EF6,perfectly solved the problem above.