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
Have a look at the following page for a simple walk-through of how to change your code to use a Bulk Insert instead of using LINQ's InsertOnSubmit() function.
You just need to add the (provided) BulkInsert class to your code, make a few subtle changes to your code, and you'll see a huge improvement in performance.
Mikes Knowledge Base - BulkInserts with LINQ
Good luck !