예제 #1
0
 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;
     }
 }
예제 #2
0
 public void Update(EmployeeUpdateEvent message)
 {
     ApplyChange(message);
 }