My problem is that when I get a SQL exception from the entity framework (say for example, because of a null value that isn't allowed to be null), it's sometimes hard to figure out which property is being referred to, and why it is null.
Now I know I can set up a SQL trace and log it which will give me the information I need, but this means I have to re-create the problem once I have turned logging on, which isn't always simple.
Ideally, I would like to be able to have the entity framework automatically include the actual SQL statement that caused the problem when it throws a SQL exception.
Is this possible?