Beispiel #1
0
        public void UpdatePersonAddress(City city, string value)
        {
            var address = PersonAddresses
                          .FirstOrDefault(x => !x.IsDeleted);

            if (address == null)
            {
                PersonAddresses.Add(
                    PersonAddress.Create(city));
            }
            else
            {
                address.Update(city);
            }
        }
Beispiel #2
0
 public static Person Create(
     Name name,
     PersonalNumber personalNumber,
     DateTime birthDate,
     PersonAddress address,
     string image,
     Gender gender)
 {
     return(new Person(
                name,
                personalNumber,
                birthDate,
                address,
                image,
                gender));
 }
Beispiel #3
0
 private Person(
     Name name,
     PersonalNumber personalNumber,
     DateTime birthDate,
     PersonAddress address,
     string image,
     Gender gender)
     : this()
 {
     Name           = name;
     PersonalNumber = personalNumber;
     BirthDate      = birthDate;
     AddPersonAddresses(address);
     Image  = image;
     Gender = gender;
 }