public static Organization ToOrganization(this customerDto.Organization organizaionDto)
        {
            var result = new Organization
            {
                Id         = organizaionDto.Id,
                Name       = organizaionDto.Name,
                MemberType = organizaionDto.MemberType,
                UserGroups = organizaionDto.Groups,
                Emails     = organizaionDto.Emails
            };

            if (organizaionDto.Addresses != null)
            {
                result.Addresses = organizaionDto.Addresses.Select(ToAddress).ToList();
            }

            if (organizaionDto.Emails != null)
            {
                result.Emails = organizaionDto.Emails;
            }
            if (!organizaionDto.DynamicProperties.IsNullOrEmpty())
            {
                result.DynamicProperties = organizaionDto.DynamicProperties.Select(ToDynamicProperty).ToList();
            }

            return(result);
        }
        public static customerDto.Organization ToOrganizationDto(this Organization org)
        {
            var retVal = new customerDto.Organization
            {
                Id         = org.Id,
                Name       = org.Name,
                MemberType = "Organization"
            };

            if (!org.UserGroups.IsNullOrEmpty())
            {
                retVal.Groups = org.UserGroups.ToArray();
            }
            if (!org.Addresses.IsNullOrEmpty())
            {
                retVal.Addresses = org.Addresses.Select(ToCustomerAddressDto).ToList();
            }
            if (!org.Emails.IsNullOrEmpty())
            {
                retVal.Emails = org.Emails;
            }
            return(retVal);
        }