public async Task <ResultPT> GetAllAsync( ) { try { objResultPT = new ResultPT(); using (EmployeesDAL objEmployeesDAL = new EmployeesDAL()) { objResultPT.ReturnObject = await objEmployeesDAL.GetAllAsync(); } throw new Exception("Error Test"); return(objResultPT); } catch (Exception Ex) { ////log error message into database. await this.LogErrorAsync(ErrorLog.ApplicationName.BAL, System.Reflection.MethodBase.GetCurrentMethod().Name, Ex.Message, Ex.StackTrace); objResultPT.TransactionStatus = Enums.ResultStatus.Failure; objResultPT.ResultMsg = Ex.Message; } return(objResultPT); }