public async Task <ActionResult <ProjectDTO> > PostAsync(ProjectDTO project) { if (project is null) { return(BadRequest("Project is null")); } if (project.Manager is null || !await _repo.UserExistsAsync(project.Manager.UserId)) { return(NotFound("Manager not found")); } var newId = await _repo.CreateProjectAsync(project); return(CreatedAtAction( nameof(GetAsync), new { projectId = newId }, await _repo.ReadProjectAsync(newId) )); }