public IActionResult TestDownload(Guid id, string Download) { var test = _testRepository.GetItem(id); if (test != null) { string testToDownload = string.Empty; if (Download == TestType.Input.ToString()) { testToDownload = test.TestInput; } else if (Download == TestType.Output.ToString()) { testToDownload = test.TestOutput; } return(Ok(testToDownload)); } return(Ok("Test is null!")); }