I'm working on this - I'm also intending to create a MySqlBulkCopy class that works like the SqlBulkCopy class does with MS SQL Server - so it will create an INSERT ... VALUES statement with multiple rows for a given enumerable.
@gitsno just a notice, original MySqlBulkCopy uses LOAD DATA INFILE syntax and I think it offers much better performance for large datasets;
I assume that efficiency of INSERT .. VALUES (row1), (row2) ... (rowN) syntax is very close to several insert statements executed with one MySqlCommand. This approach works for any database (not only MySql/MsSql), and this use-case is already covered by many data access libs. What do you think?
Agreed - I'm not suggesting that it's preferred over LOAD DATA INFILE, but given that developers are used to working with SqlBulkCopy and it does work well, I figure it would be nice to have it as an alternative for the MySql client. If you already have the records in a .NET DataTable or IEnumerable you have to write extra code to get them into the file format that LOAD DATA INFILE expects, whereas if the SqlBulkCopy is implemented you can insert them easily.