///<Summary> ///Delete all by foreign key ///This method deletes all rows in the table purchase_order_details with a given foreign key ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///IzNorthwindClassLibrayConn_TxConnectionProvider connectionProvider, string inventoryId ///</parameters> public static void DeleteAllByInventoryId(IzNorthwindClassLibrayConn_TxConnectionProvider connectionProvider, string inventoryId) { Doing(null); MySqlCommand command = new MySqlCommand(); command.CommandText = "ctpr_purchase_order_details_deletebyinventoryid"; command.CommandType = CommandType.StoredProcedure; command.Connection = connectionProvider.Connection; command.Transaction = connectionProvider.CurrentTransaction; try { command.Parameters.Add(new MySqlParameter("?P_INVENTORY_ID", MySqlDbType.VarChar, 0, ParameterDirection.Input, true, 10, 0, "", DataRowVersion.Proposed, (object)inventoryId ?? (object)DBNull.Value)); command.ExecuteNonQuery(); Done(null); } catch (Exception ex) { Failed(null, ex); Handle(null, ex); } finally { command.Dispose(); } }
protected virtual void Dispose(bool isDisposing) { if (!_isDisposed) { if (isDisposing) { if (_connectionProvider != null) { ((IDisposable)_connectionProvider).Dispose(); _connectionProvider = null; } } } _isDisposed = true; }
private RF() { _connectionProvider = new zNorthwindClassLibrayConn_TxConnectionProvider(); _repositories = new List <object>(); }