Esempio n. 1
0
        public PeopleNasab(Guid identity, PeopleId person, PersonFaithStage faithStage, PeopleId father, Guid kabilahId, PeopleId mother = null, bool died = false) : base(identity)
        {
            Person     = person;
            Father     = father;
            KabilahId  = kabilahId;
            NasabPath  = string.Empty;
            FaithStage = faithStage;
            Died       = died;

            ReadModel = new PeopleNasabReadModel(Identity)
            {
                PersonId   = Person.Value,
                FatherId   = Father.Value,
                KabilahId  = KabilahId,
                NasabPath  = NasabPath,
                FaithStage = FaithStage,
                Died       = Died
            };

            if (mother == null)
            {
                ReadModel.AddDomainEvent(new OnNasabAddedWithoutMother(Person.Value, Father.Value, kabilah: KabilahId));
            }
            else
            {
                ReadModel.AddDomainEvent(new OnNasabAddedWithMother(Person.Value, Father.Value, mother.Value, kabilah: KabilahId));
            }
        }
Esempio n. 2
0
        public Wedding(Guid identity, PeopleId father, Guid kabilahId, PeopleId mother = null) : base(identity)
        {
            KabilahID = kabilahId;

            Father = father;
            Mother = mother;

            Divorced = false;

            Chidren = new List <PeopleId>().AsReadOnly();
        }
Esempio n. 3
0
 public override bool Equals(System.Object otherPeople)
 {
     if (!(otherPeople is People))
     {
         return(false);
     }
     else
     {
         People newPeople          = (People)otherPeople;
         bool   peopleIdEquality   = PeopleId.Equals(newPeople.PeopleId);
         bool   peopleNameEquality = Name.Equals(newPeople.Name);
         return(peopleIdEquality && peopleNameEquality);
     }
 }
Esempio n. 4
0
 internal void AddChild(PeopleId peopleId)
 {
     throw new NotImplementedException();
 }