示例#1
0
        public void ChangeName(string newName)
        {
            var @event = new EmployeeNameChangedEvent {
                EmployeeId = (Guid)this.Id, Name = newName
            };

            Apply(@event);
        }
示例#2
0
 public void Handle(EmployeeNameChangedEvent @event)
 {
     PerformDbAction(x =>
     {
         var employee = x.Query<EmployeeDetails>().Single(y => y.EmployeeId == @event.EmployeeId.ToString());
         employee.Name = @event.Name;
     });
 }
示例#3
0
 public void ChangeName(string newName)
 {
     var @event = new EmployeeNameChangedEvent { EmployeeId = (Guid)this.Id, Name = newName };
     Apply(@event);
 }