public async Task <IActionResult> GetStudentsForProgramme(string id) { var programme = await _programmeRepository.GetProgrammeWithStudents(id); if (programme != null) { // _mapper.Map return(Ok(_mapper.Map <ProgrammeDto>(programme))); } else { _logger.LogWarning($"Get programme. Id {id} not found."); return(NotFound()); } }