public void AddConfigurationManagementService(Guid organizationId, string name, ConfigurationManagementService type, CMSConnectionType connectionType, string accountId, string accountName, string accessId, string accessSecret, string accessToken) { Organization organization = FindOrganizationById(organizationId); if (organization == null) { throw new ApplicationException($"The organization with id {organizationId} does not exists"); } var newOrganizationCMS = OrganizationCMS.Factory.Create(name, type, connectionType, accountId, accountName, accessId, accessSecret, accessToken, this.Id); organization.AddConfigurationManagementService(newOrganizationCMS); }