public async Task <ProjectFeatureAllServiceListRp> GetProjectFeatureAllServices(Guid organizationId, Guid projectId, Guid featureId) { string loggedUserId = _identityService.GetUserId(); DomainModels.User user = await _userRepository.GetUser(loggedUserId); DomainModels.Organization organization = user.FindOrganizationById(organizationId); if (organization == null) { await _domainManagerService.AddNotFound($"The organzation with id {organizationId} does not exists."); return(null); } DomainModels.Project project = user.FindProjectById(projectId); if (project == null) { await _domainManagerService.AddNotFound($"The project with id {projectId} does not exists."); return(null); } DomainModels.ProjectFeature feature = project.GetFeatureById(featureId); if (feature == null) { await _domainManagerService.AddNotFound($"The project feature with id {featureId} does not exists."); return(null); } ProjectFeatureAllServiceListRp list = new ProjectFeatureAllServiceListRp(); var projectServices = project.GetServices(); foreach (var projectService in projectServices) { var featureService = feature.GetFeatureServiceById(projectService.ProjectServiceId); var item = new ProjectFeatureAllServiceListItemRp() { ProjectServiceId = projectService.ProjectServiceId, Name = projectService.Name }; if (featureService != null) { item.IsFeatureService = true; } list.Items.Add(item); } return(list); }