public async Task <IActionResult> RemoveTestResult(int id) { try { var removed = await _testResultService.RemoveTestResult(id); if (!removed) { return(NotFound()); } return(NoContent()); } catch (Exception e) { return(StatusCode(500, new JsonResult(new { message = $"Something went wrong inside the remove TestResult action: {e.Message}" }))); } }