Exemple #1
0
 protected IActionResult HandleOnDTO <T>(T dto, ReqOn <T> r, IActionResult result = null, ReqOn <IActionResult> onErrorHandling = null)
 {
     try { return(r(dto)); }
     catch (Exception ex)
     {
         return(HandleError(ex));
     }
 }
Exemple #2
0
 protected IActionResult HandleNoParameter(NoParameterActionResult r, IActionResult result = null, ReqOn <IActionResult> onErrorHandling = null)
 {
     try
     {
         return(r());
     }
     catch (Exception ex)
     {
         return(HandleError(ex));
     }
 }