protected ApiResponseBase TryAction(Action action) { var result = new ApiResponseBase(); try { action(); } catch (Exception ex) { CatchException(ex, result); } return(result); }
protected ApiResponseBase TryFunc <T>(Func <T> func) { var result = new ApiResponseBase <T>(); try { result.Data = func(); } catch (Exception ex) { CatchException(ex, result); } return(result); }