In my current project, we use the Entity Framework and in this context we save data coming from the remote system. When I try to save objects, I need to say with certainty whether the exception is something that can be restored or not.
To clarify, “restored” means “just trying to retry a little later will be safe and potentially successful. This will include problems with network connectivity, restarting the database server, or similar situations.
There will be essentially nothing else inconvertible in this context, including integrity constraints and internal errors of the Entity Framework (the database is not synchronized with the EF model). It can be argued that some integrity constraints can be restored if someone “corrects” the data, but in this case there will be only one writer.
Is there a reliable way to categorize exceptions from the Entity Framework into one of these two categories?
source
share