Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "pratiksa"

Thanks it is working.

<cite>maliming: </cite> Call CurrentUnitOfWork.SaveChangesAsync() to catch exceptions

try
{
 
  //db operations.
  CurrentUnitOfWork.SaveChangesAsync()

}
catch (DbUpdateException e)
{
  SqlException s = e.InnerException.InnerException as SqlException;
  //handle and see your exception
}

These are the database error messages, I think should not be displayed to the UI. The application should avoid this error. For example, do parameter verification and supplement unit testing.

Even if this kind of message is displayed to the UI, sometimes it does not understand what is going on.

I tried but it is not working.

Actually have added the unique constraints in my database and I want to check the validation message for duplicate field. So i am trying to catch the error message and sent it to UI by editing in error message so user can easily understand.

<cite>maliming: </cite>

Hi, I want to show an exact error message on UI . I know the reason why insertion is failing but not getting any error message from InsertAsync.

<cite>alper: </cite>

I tried this but not working.


     try
           {

               
           }
           catch (DbUpdateException e)
           {
               SqlException s = e.InnerException.InnerException as SqlException;
               //handle and see your exception
           } 

}

<cite>ismcagdas: </cite> It is a private repository. Go to <a class="postlink" href="https://aspnetzero.com/LicenseManagement">https://aspnetzero.com/LicenseManagement</a> and add your github user on github users tab.

I clicked on link ><cite>ismcagdas: </cite>

It is a private repository. Go to <a class="postlink" href="https://aspnetzero.com/LicenseManagement">https://aspnetzero.com/LicenseManagement</a> and add your github user on github users tab.

I clicked on above link and i have login-ed with forum but i am not getting the option for git hub user. Could you please precise the steps.

<cite>alper: </cite> for the others I created a wiki page for adding a new item to AbpSession <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/wiki">https://github.com/aspnetzero/aspnet-zero-core/wiki</a>

After clicking on link i am getting 404 not found error. Could you please resend me the link

Hello,

Thanks for above solution. But we need to always inject "MyAppSession" class whenever we want to use and it is seems to be not working like "IAbpSession" any other possible solution rather than injection.

Showing 1 to 7 of 7 entries