Linq to SQL generates StackOverflowException in tight Insert loop
- by ChrisW
I'm parsing an XML file and inserting the rows into a table (and related tables) using LinqToSQL.
I parse the XML file using LinqToXml into IEnumerable. Then, I create a foreach loop, where I build my LinqToSQL objects and call InsertOnSubmit and SubmitChanges at the end of each loop. Nothing special here.
Usually, I make it through around…