3
Following the question: How to intercept exceptions when working with the Entity Framework?
Is it possible to get any error type identifier? For example, Primary Key Violation, Foreign Key Inconsistency and, in my specific case, when it is a single key violation.
Anyway, working with Entityframework I am intercepting the exceptions released as follows:
try {
...
}
catch (DbUpdateException e) {
TempData["Mensagens"] = "Ocorreu um erro enquanto ...";
}
How to identify the RU specific error type and then be able to handle the message?
Got it I’ll edit
– user6026
http://msdn.microsoft.com/en-us/library/cc645603(v=sql.105). aspx take a look at this ...
– user6026
Yes, as I understood yes the mistakes follow a pattern, this is good, because there depends on the bank
– user6026
@Tremdoido, I will do a deeper research and talk to a group about Entity and its exceptions if I discovered something new warning you on (@)
– user6026