/// <summary> /// 执行查询,并返回受影响的行数 /// </summary> /// <param name="cmdText"></param> /// <returns></returns> public int ExecuteNonQuery(string cmdText, DbParameter[] parameters) { var affrows = 0; try { affrows = PgSqlHelper.ExecuteNonQuery(CommandType.Text, cmdText, command => { this.Command = command; this.Connection = command?.Connection; }, parameters); } finally { this.Clear(); } return(affrows); }
/// <summary> /// 执行查询,并返回受影响的行数 /// </summary> /// <param name="cmdText"></param> /// <returns></returns> public int ExecuteNonQuery(string cmdText) => PgSqlHelper.ExecuteNonQuery(CommandType.Text, cmdText, ParamList.ToArray());