You can use MessageBox.Show Method in the catch to show the error messge in the data layer.
- Add
System.Windows.Forms
in your layer reference - Add
Using System.Windows.Forms;
for the class which you want to use. - Put
MessageBox.Show("This is Error Meaage");
in the catch to show the message.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.