Пример #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);
 }