public async Task <IActionResult> GetAll() { try { return(Ok(await _questionnaireService.GetAll())); } catch (AppException ex) { _response = new ServiceResponse(); _response.message = ex.Message; return(StatusCode(StatusCodes.Status400BadRequest, _response)); } catch (Exception ex) { _response = new ServiceResponse(); _response.message = "Something went wrong, " + ex.Message.ToString(); return(StatusCode(StatusCodes.Status500InternalServerError, _response)); } }