I have a CSV file and I have to insert it into a SQL Server database. Is there a way to speed up the LINQ inserts?
I\'ve created a simple Repository method to save a rec
This code runs ok, and prevents large amounts of data:
if (repository2.GeoItems.GetChangeSet().Inserts.Count > 1000) { repository2.GeoItems.SubmitChanges(); }
Then, at the end of the bulk insertion, use this:
repository2.GeoItems.SubmitChanges();