Hi everyone. Here is the situation:
Lets's imagine we have table A in the database and we've created Entity model for that table. Let's also imagine that there are several Uniqeu and Foreign constraints in that table.
Now let's do the following:
- load more than 1 record from that table into the context.
- Change some objects to make some constraints be violated
- SaveChanges in the context.
We will receive SqlException that will say that some constraints were violated.
The question is - can we get the object that triggered that constraints violation from the context (to show friendly message for user e t.c.)
Thanks in advance