Пример #1
0
        private async Task <IActionResult> GetAllTestResults(DatatableParametersViewModel dataTableParameters)
        {
            try
            {
                var result = await _testResultService.GetAll(_mapper.Map <DatatableParametersDto>(dataTableParameters));

                return(Ok(result));
            }
            catch (Exception e)
            {
                return(StatusCode(500, new JsonResult(new { message = $"Something went wrong inside the getall testresults action: {e.Message}" })));
            }
        }
Пример #2
0
        private async Task <IActionResult> GetAllNormalRanges(DatatableParametersViewModel dataTableParameters)
        {
            try
            {
                var result = await _normalRangeService.GetAll(_mapper.Map <DatatableParametersDto>(dataTableParameters));

                if (result == null)
                {
                    return(BadRequest());
                }
                return(Ok(result));
            }
            catch (Exception e)
            {
                return(StatusCode(500, new JsonResult(new { message = $"Something went wrong inside the getall NormalRange action: {e.Message}" })));
            }
        }