I don't think this is going to work.  You can have other pending changes on the db context at this point, including deleting this edit.  If the SaveChanges failed before, it will fail again.  It's possible that saving this edit has failed because the edit has been deleted too, in which case this will doubly fail.  And if this SaveChanges throws, then we're toast.

I suggest instantiating a new EntitiesContext (a separate one), trying to get the packageEdit by its key, and if that is found, trying to set its LastError and then save changes.

This also surfaces another issue with the error handling that I didn't think about before... you're building up changes from each edit to the next, and if SaveChanges fails, the next iteration in the loop will fail as will all subsequent iterations.  In order to address that, each iteration over the edits to be applied must get a fresh entities context--otherwise, once there's an error, we are stuck in an error state.