コード例 #1
0
        public override Member ToModel(Member member)
        {
            //Call base converter first
            base.ToModel(member);

            var organization = member as Organization;

            if (organization != null && MemberRelations.Any())
            {
                organization.ParentId = MemberRelations.FirstOrDefault().AncestorId;
            }
            return(member);
        }
コード例 #2
0
        public override Member ToModel(Member member)
        {
            //Call base converter first
            base.ToModel(member);

            if (member is Organization organization)
            {
                organization.Description      = Description;
                organization.OwnerId          = OwnerId;
                organization.BusinessCategory = BusinessCategory;
                if (MemberRelations.Any())
                {
                    organization.ParentId = MemberRelations
                                            .FirstOrDefault(x => x.RelationType == RelationType.Membership.ToString())?
                                            .AncestorId;
                }
            }
            return(member);
        }
コード例 #3
0
        public override Member ToModel(Member member)
        {
            //Call base converter first
            base.ToModel(member);

            var organization = member as Organization;

            if (organization != null)
            {
                organization.Description      = Description;
                organization.OwnerId          = OwnerId;
                organization.BusinessCategory = BusinessCategory;
                if (MemberRelations.Any())
                {
                    organization.ParentId = MemberRelations.FirstOrDefault().AncestorId;
                }
            }
            return(member);
        }