Ejemplo n.º 1
0
        public Task Handle(RemoveEmployeeEvent notification, CancellationToken cancellationToken)
        {
            if (_companyCatalog.TryGetValue(notification.Company, out InMemoryCompany inMemoryCompany))
            {
                inMemoryCompany.Employees.RemoveAll(x => x.Id == notification.Employee);
                _employeeCatalog.Remove(notification.Employee);
            }

            return(Task.CompletedTask);
        }
Ejemplo n.º 2
0
 public void Handle(RemoveEmployeeEvent e)
 {
     this.EditDate = e.CreateDate;
     this.Editor   = e.Creator;
 }