public void Install() { //create the table var dbScript = CreateDatabaseScript(); DBScriptHelper dbHelper = new DBScriptHelper(); dbScript = dbHelper.GetSqlFilter(dbScript); Database.ExecuteSqlCommand(dbScript); SaveChanges(); }
public void Install() { //create the table var dbScript = CreateDatabaseScript(); DBScriptHelper dbHelper = new DBScriptHelper(); dbScript = dbHelper.GetSqlFilter(dbScript); try { Database.ExecuteSqlCommand(dbScript); SaveChanges(); } catch (Exception ex) { //throw; //TODO:此处如果调用log4会导致HttpRuntime.UnloadAppDomain();报错,站点无法刷新重启,导致插件安装状态不对 //Log4Helper.Error(this.GetType(), ex, new Guid("8D2E6410-2B20-E711-8A80-B8AC6F19DFD9")); } }