In .net 3.5, I have this relationship in my database:
Interactions (1) ---- (many)QuestionResponses
In the code below, everything works fine if I leave off the last two lines (delete interaction). Once I add the last two lines, I get this error:
tion : Row not found or changed.
I understand the error can occur if the row was marked for deletion and then not found. That isn't the case here. I delete four rows from QuestionResponses then delete one from Interactions. So the row in Interactions is there. Any suggestions?
var interaction = (myquery).SingleOrDefault();
if (interaction != null)
var Question = context.QuestionResponses.Where(x => x.InteractionID == interaction.InteractionID).ToList();
context.SubmitChanges(); //fail here with error