public RegistrationRequestedEvent(PersonTotalName name, string email, string phone, string comment) { this.Name = name; this.Email = email; this.Phone = phone; this.Comment = comment; }
public void Change(Gender gender, PersonTotalName name, string email = "", string phone = "", DateTime?dateBirth = null, DateTime?dateDeath = null) { this.Gender = gender; this.Name = name; this.Email = email; this.Phone = phone; this.DateBirth = dateBirth?.Date; this.DateDeath = dateDeath?.Date; }
static public Person Create(Gender gender, PersonTotalName name, string email = "", string phone = "", DateTime?dateBirth = null, DateTime?dateDeath = null) { return(new Person() { Gender = gender, Name = name, Email = email ?? "", Phone = phone ?? "", DateBirth = dateBirth?.Date, DateDeath = dateDeath?.Date }); }
public void Registration(PersonTotalName name, string email, string phone, string comment = "") { DomainEvents.Raise(new RegistrationRequestedEvent(name, email, phone, comment)); }