C
C#5mo ago
mikibanan

Perform BulkInsert with multiple tables in dapper

Hi, I have simple DB with 4 tables. Products, Manufacturers, Databases and ProductsQuantity. I have one csv with Name, Manufacturer and multiple quantities from different databases. How to bulk insert new products with all the relations?
3 Replies
L. MS
L. MS5mo ago
So you want to read the data out the csv file and put it in the db?
mikibanan
mikibanan5mo ago
Yes
L. MS
L. MS5mo ago
you can use ADO.NET for database operations. Use classes like SqlConnection , SqlCommand and SqlBulkCopy for more efficiently inserting large data amounts in the db by minimizing the back and forward communication