예제 #1
0
 // ---------------------------------------------------------------------
 // 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();
     }
 }
예제 #2
0
 // ---------------------------------------------------------------------
 // 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();
     }
 }