// --------------------------------------------------------------------- // Delete // --------------------------------------------------------------------- public void Delete <T>(T model, String statement, IDeleteable <T> traits) { using (SqlCommand cmd = new SqlCommand(statement, m_connection)) { traits.ApplyDelete(model, cmd); cmd.ExecuteNonQuery(); } }
// --------------------------------------------------------------------- // Delete // --------------------------------------------------------------------- public void Delete <T>(T model, String statement, IDeleteable <T> traits) { using (IDbCommand command = m_connection.CreateCommand()) { command.CommandText = statement; traits.ApplyDelete(model, command); command.ExecuteNonQuery(); } }