Any ideas on why this could be breaking?
foreach (var p in pp)
{
ProjectFiles projectFile = (ProjectFiles)p;
projectFile.Status = Constants.ProjectFiles_ERROR;
projectFile.DateLastUpdated = DateTime.Now;
context.SaveChanges();
}
I read that the workaround the issue, is to retrieve the results in one go before the foreach loop.
But didnt I do that? "pp" is the collection of results in my case