title: Bulk copy a DataTable into MySQL (similar to System.Data.SqlClient.SqlBulkCopy)
body: <p>I am migrating my program from Microsoft SQL Server to MySQL. Everything works well except one issue with bulk copy.</p>
  
  <p>In the solution with MS SQL the code looks like this:</p>
  
  <pre><code>connection.Open();
  SqlBulkCopy bulkCopy = new SqlBulkCopy(connection);
  bulkCopy.DestinationTableName = "testTable";
  bulkCopy.WriteToServer(rawData);
  </code></pre>
  
  <p>Now I try to do something similar for MySQL. Because I think there would be bad performance I don't want to write the DataTable to a CSV file and do the insert from there with the <code>MySqlBulkLoader</code> class.</p>
  
  <p>Any help would be highly appreciated.</p>