Add items to prevent azure from overloading db

This commit is contained in:
2016-04-09 22:20:06 -04:00
parent a5072850ea
commit 2c3aa9c989
2 changed files with 11 additions and 1 deletions
+9
View File
@@ -1,5 +1,6 @@
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Data.Entity.SqlServer;
using LeafWeb.Core.Entities;
namespace LeafWeb.Core.DAL
@@ -19,4 +20,12 @@ namespace LeafWeb.Core.DAL
base.OnModelCreating(modelBuilder);
}
}
public class LeafWebDbConfiguration : DbConfiguration
{
public LeafWebDbConfiguration()
{
SetExecutionStrategy("System.Data.SqlClient", () => new SqlAzureExecutionStrategy());
}
}
}