public void DropDb() { var commandText = "DROP SCHEMA public CASCADE;CREATE SCHEMA public;"; Database.ExecuteSqlCommand(commandText); }
/// <summary> /// sql执行数据库 /// </summary> /// <param name="sql"></param> /// <param name="parms"></param> /// <returns></returns> public int ExecuteSqlCommand(string sql, params object[] parms) { return(Database.ExecuteSqlCommand(sql, parms)); }