Which would be the right way to throw exceptions that the SQL server throws when I delete data using link restriction from C # code.
I want to show my message to users as:
"I can’t delete the data because it’s being used"
, and not show the message as follows:
The DELETE statement conflicted with the REFERENCE constraint ... The conflict ccurred*in database "rampa", table "dbo.doc", column 'kartica_id'.
source
share