public void Handle(EmployeeUpdateEvent message) { if (!string.IsNullOrEmpty(message.FirstName)) { AggregateRoot.FirstName = message.FirstName; } if (!string.IsNullOrEmpty(message.LastName)) { AggregateRoot.LastName = message.LastName; } if (message.DateOfBirth.HasValue) { AggregateRoot.DateOfBirth = message.DateOfBirth.Value; } if (!string.IsNullOrEmpty(message.JobTitle)) { AggregateRoot.JobTitle = message.JobTitle; } }
public void Update(EmployeeUpdateEvent message) { ApplyChange(message); }