public virtual void DeleteObject(int iObjectID, DbTransaction transaction) { try { DbCommand storedProcedure = SqlDatabaseHelper.GetStoredProcedure(this.GenerateDeleteStoredProcedureName()); SqlDatabaseHelper.AddInParameter(storedProcedure, SqlDatabaseHelper.GetPrimaryKeyColumn(this.TableName), SqlDbType.Int, (object)iObjectID); storedProcedure.Transaction = transaction; SqlDatabaseHelper.RunStoredProcedure(storedProcedure); SqlDatabaseHelper.CommitTransaction(transaction); } catch (Exception ex) { SqlDatabaseHelper.RollbackTransaction(transaction); } }
public void CommitTransaction(DbTransaction transaction) { SqlDatabaseHelper.CommitTransaction(transaction); }