public int CreatedTable(string table) { try { var dbs = new DBScripter(_connection); var script = dbs.GetTableScript(table); if (!string.IsNullOrEmpty(script)) { script = script.Replace(table, "Temp" + table); } return(Execute(script, null)); } catch (System.Exception ex) { return(0); } finally { //if (connectionClose == true) //{ // _connection.Close(); // _connection.Dispose(); //} } }
public static ReturnValue GetDBScript(string tables = null) { var Tables = tables == null ? null : tables.Split(','); var dbs = new DBScripter(ScoopConnectionType.WebConfigConnection); return(dbs.GenerateTableScript(Tables)); }