///<Summary> ///Delete all by foreign key ///This method deletes all rows in the table IdentityUserClaim with a given foreign key ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///IzNorthwindRestApiConn_TxConnectionProvider connectionProvider, Int32? userId ///</parameters> public static void DeleteAllByUserId(IzNorthwindRestApiConn_TxConnectionProvider connectionProvider, Int32?userId) { Doing(null); SqlCommand command = new SqlCommand(); command.CommandText = InlineProcs.ctprIdentityUserClaim_DeleteAllByUserId; command.CommandType = CommandType.Text; command.Connection = connectionProvider.Connection; command.Transaction = connectionProvider.CurrentTransaction; try { command.Parameters.Add(CtSqlParameter.Get("@UserId", SqlDbType.Int, 4, ParameterDirection.Input, true, 10, 0, "", DataRowVersion.Proposed, (object)userId ?? (object)DBNull.Value)); command.ExecuteNonQuery(); Done(null); } catch (Exception ex) { Failed(null, ex); Handle(null, ex); } finally { command.Dispose(); } }
///<Summary> ///Delete all by foreign key ///This method deletes all rows in the table CustomerCustomerDemo with a given foreign key ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///IzNorthwindRestApiConn_TxConnectionProvider connectionProvider, string customerTypeID ///</parameters> public static void DeleteAllByCustomerTypeID(IzNorthwindRestApiConn_TxConnectionProvider connectionProvider, string customerTypeID) { Doing(null); SqlCommand command = new SqlCommand(); command.CommandText = InlineProcs.ctprCustomerCustomerDemo_DeleteAllByCustomerTypeID; command.CommandType = CommandType.Text; command.Connection = connectionProvider.Connection; command.Transaction = connectionProvider.CurrentTransaction; try { command.Parameters.Add(CtSqlParameter.Get("@CustomerTypeID", SqlDbType.NChar, 10, ParameterDirection.Input, false, 0, 0, "", DataRowVersion.Proposed, (object)customerTypeID ?? (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 zNorthwindRestApiConn_TxConnectionProvider(); _repositories = new List <object>(); }