This SqlTransaction has completed; it is no longer usable during Linq to Sql dataContext.SubmitChanges
up vote
0
down vote
favorite
I seem to have the a similar issue as is cited here, but there are no satisfactory answers on that post - This SqlTransaction has completed; it is no longer usable. Specifically, I use InsertOnSubmit to insert 100 objects into one of the tables in my data context, and then I call SubmitChanges on the data context. Every once in a while, when I call SubmitChanges, I get the error in the title of this question. I create a new data context just after the SubmitChanges every 500 records. So my code looks like this: DataContext writeDataContext = new DataContext(myConnectionString); List<MyCalculation> calculationsToAdd = new List<MyCalculation>(); foreach (var transaction in transactions) { var myCalculation = new MyCalculat...