コード例 #1
0
        public void DropDb()
        {
            var commandText = "DROP SCHEMA public CASCADE;CREATE SCHEMA public;";

            Database.ExecuteSqlCommand(commandText);
        }
コード例 #2
0
 /// <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));
 }