summaryrefslogtreecommitdiffstats
path: root/projecttemplates/RelyingPartyLogic/Database.cs
diff options
context:
space:
mode:
Diffstat (limited to 'projecttemplates/RelyingPartyLogic/Database.cs')
-rw-r--r--projecttemplates/RelyingPartyLogic/Database.cs15
1 files changed, 1 insertions, 14 deletions
diff --git a/projecttemplates/RelyingPartyLogic/Database.cs b/projecttemplates/RelyingPartyLogic/Database.cs
index d7efeac..f162b95 100644
--- a/projecttemplates/RelyingPartyLogic/Database.cs
+++ b/projecttemplates/RelyingPartyLogic/Database.cs
@@ -38,20 +38,7 @@ namespace RelyingPartyLogic {
DatabaseEntities dataContext = DataContextSimple;
if (dataContext == null) {
dataContext = new DatabaseEntities();
- try {
- dataContext.Connection.Open();
- } catch (EntityException entityEx) {
- var sqlEx = entityEx.InnerException as SqlException;
- if (sqlEx != null) {
- if (sqlEx.Class == 14 && sqlEx.Number == 15350) {
- // Most likely the database schema hasn't been created yet.
- HttpContext.Current.Response.Redirect("~/Setup.aspx");
- }
- }
-
- throw;
- }
-
+ dataContext.Connection.Open();
DataContextTransaction = (EntityTransaction)dataContext.Connection.BeginTransaction();
DataContextSimple = dataContext;
}