I am dealing with pieces of data, each of which contains 50 thousand rows. I insert them into the SQL database using LINQ:
for(int i=0;i<50000;i++) { DB.TableName.InsertOnSubmit ( new TableName { Value1 = Array[i,0], Value2 = Array[i,1] } ); } DB.SubmitChanges();
It takes about 6 minutes, and I want it to be much less if possible. Any suggestions?
c # sql-server linq bulkinsert
sooprise
source share