this was crazy the solution was found in the following thread
Reason: we cannot do savechanges while still the reader is open.
//This will fail because we are doing savechanges while the reader is open
xs= Dataservice.GetX().Where(x=>!x.Ideleted)
foreach(x in xs)
{
//do something
Savechanges()
}
//this will succed becasuse we did a tolist(which closed the reader) and then did savechanges
xs= Dataservice.GetX().Where(x=>!x.Ideleted).ToList();
foreach(x in xs)
{
//do something
Savechanges()
}