public async Task <IActionResult> GetAll(int RecordLimit) { ResponseHelper objHelper = new ResponseHelper(); try { var vList = await Module_PermissionRepo.GetAll(RecordLimit); if (vList == null) { objHelper.Status = StatusCodes.Status200OK; objHelper.Message = "Get Empty Data"; } else { objHelper.Status = StatusCodes.Status200OK; objHelper.Message = "Get Successfully"; objHelper.Data = vList; } return(Ok(objHelper)); } catch { objHelper.Status = StatusCodes.Status500InternalServerError; objHelper.Message = "Get Unsuccessful"; return(StatusCode(StatusCodes.Status500InternalServerError, objHelper)); } }
public async Task <IActionResult> GetAll(int RecordLimit) { ResponseHelper objHelper = new ResponseHelper(); try { var vList = await Module_PermissionRepo.GetAll(RecordLimit); objHelper.Status = StatusCodes.Status200OK; objHelper.Message = "Get Successfully"; objHelper.Data = vList; return(Ok(objHelper)); } catch (Exception ex) { objHelper.Status = StatusCodes.Status500InternalServerError; objHelper.Message = ex.Message; return(StatusCode(StatusCodes.Status500InternalServerError, objHelper)); } }