diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-02 19:27:55 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-01-02 20:06:12 -0800 |
commit | 79940b04078862a608e18c19749d8abe5a6eb8d5 (patch) | |
tree | ac9fab18c79c5eac7217f7fc66d9a6ba7ce06241 /projecttemplates/RelyingPartyLogic/Database.cs | |
parent | edaea39fc722fea78c115e05726ad6e0447ae89b (diff) | |
download | DotNetOpenAuth-79940b04078862a608e18c19749d8abe5a6eb8d5.zip DotNetOpenAuth-79940b04078862a608e18c19749d8abe5a6eb8d5.tar.gz DotNetOpenAuth-79940b04078862a608e18c19749d8abe5a6eb8d5.tar.bz2 |
Removed the fragile magic code for db creation.
Diffstat (limited to 'projecttemplates/RelyingPartyLogic/Database.cs')
-rw-r--r-- | projecttemplates/RelyingPartyLogic/Database.cs | 15 |
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; } |