Here's an attempt to clarify the question...
I previously used Linq2Sql with all data operations performed by stored procedures. In these stored procedures, I could return various (preset) error codes to signify different types of errors and also return any SQL error codes. In my application framework, I had a nice way to lookup the error code, get a meaningful description of the error and then pass that useful feedback to the UI.
I've started a new project at work using Linq2Sql without any stored procedures (eg. just entity tables). The problem that I'm having is that I can't find any way to access the SQL error codes from the database after performing data operations, let alone my now non-existent custom error codes (no stored procedures, no custom error codes).
So my question is, 'Is there any way to retrieve this kind of error related feedback from the database after performing data operations?' I really need to know whether data operations have been carried out successfully or not.
Many thanks in advance.
UPDATE >>>
After receiving the first answer, I feel that I should add a bit more to try and clarify things further. I had a situation where my Linq2Sql DataContext
was not working (fixed now) and no data was being updated in the database, but no exceptions were being thrown. Therefore, I need to find a way to confirm that my data operations are succeeding... there must be some other form of confirmation better than 'the absence of exceptions'.