public async Task <IActionResult> GetProject(int id, bool includeUserStories = false) { var project = await _projectManagerRepository.GetProjectByIdAsync(id, includeUserStories); if (project == null) { _logger.LogInformation($"No project found with id {id}"); return(NotFound()); } if (includeUserStories) { var projectWithUserStory = Mapper.Map <ProjectDto>(project); return(Ok(projectWithUserStory)); } else { var projectWithoutUserStory = Mapper.Map <ProjectWithoutUserStoriesDto>(project); return(Ok(projectWithoutUserStory)); } }