Exemplo n.º 1
0
        private Organization DoCreate(NewOrganization newOrganization, OrganizationType organizationType)
        {
            organizationValidator.ValidateCreate(GetOrganizationValidationEntity(newOrganization));
            var organization = new Organization
            {
                Name               = newOrganization.Name,
                Description        = newOrganization.Description,
                OrganizationType   = organizationType,
                OrganizationTypeId = newOrganization.OrganizationType,
                Website            = newOrganization.Website,
                Status             = "Active"
            };

            SetOrganizationRoles(newOrganization.OrganizationRoles.ToList(), organization);
            SetPointOfContacts(newOrganization.PointsOfContact.ToList(), organization);

            newOrganization.Audit.SetHistory(organization);
            this.Context.Organizations.Add(organization);
            return(organization);
        }
Exemplo n.º 2
0
 private OrganizationValidationEntity GetOrganizationValidationEntity(NewOrganization newOrganization)
 {
     return(new OrganizationValidationEntity(name: newOrganization.Name, organizationTypeId: newOrganization.OrganizationType));
 }