title: Multiple INSERT in one query using MySqlCommand
body: <p>I am using the following code:</p>
  
  <pre><code>        string cmd = "INSERT INTO " + Tables.Lux() + " VALUES(NULL, @Position, @Mode, @Timer)";
          try
          {
              using (var MyConnection = new MySqlConnection(ConfigurationManager.ConnectionStrings["DataFormConnection"].ConnectionString))
              {
                  using (MySqlCommand command = new MySqlCommand(cmd, MyConnection))
                  {
                      MyConnection.Open();
                      command.Parameters.Add(new MySqlParameter("Position", Element.Position));
                      command.Parameters.Add(new MySqlParameter("Mode", Element.Mode));
                      command.Parameters.Add(new MySqlParameter("Timer", Element.Timer));
                      command.ExecuteNonQuery();
                  }
              }
          }
  </code></pre>
  
  <p>I am using the above code to insert data from a list of Element containing 100 items. I would like to add 100 values in only one query, and I know that the SQL statement looks like:</p>
  
  <pre><code>INSERT INTO table (a,b) VALUES (1,2), (2,3), (3,4);
  </code></pre>
  
  <p>but I don't know how to apply that structure using the <code>MySqlCommand.Parameters</code> approach.</p>
  
  <p>My goal is to pass this function <code>List&lt;Element&gt;</code> instead of just <code>Element</code> and create an <code>INSERT</code> statement with all the items in the list to be executed in only one query. Any help please?</p>
  
  <p>Thank you.</p>