Trying to execute an insert stored procedure in a loop using Entity Framework, something like this:
var context = new Entities()
var items = context.GetAllItems().ToList();
foreach(var item in items)
{
// Other select and update procedures
context.InsertProcedure(item.Prop1);
}
context.SaveChanges();
but I am getting an exception.
New transaction is not allowed because there are other threads running in the session
Anybody had this before?