Пример #1
0
        public Family?ConvertToV2()
        {
            if (FamilyMemberIds is null)
            {
                return(null);
            }
            var familyMembers = new List <FamilyMember>()
            {
                FamilyMember.CreateOwner(OwnerId)
            };

            foreach (var familyMemberId in FamilyMemberIds)
            {
                familyMembers.Add(FamilyMember.CreateFamilyMember(familyMemberId));
            }

            var family = new Family(Id, Name !, familyMembers, CreatedDate, UpdatedDate);

            return(family);
        }