While inserting multiple rows into a database table, smartest approach is to use bulk copy mechanism. .NET framework has SqlBulkCopy class to copy the rows in bulk to a sql server database table. Following script will be useful in the scenario.
public static void bulkCopyIntoTable(DataTable dtData,string sDatabaseTableName,string sConnectionString) { using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sConnectionString)) { bulkCopy.DestinationTableName = sDatabaseTableName; try { // Write from the source to the destination. bulkCopy.WriteToServer(dtData); } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { } } }