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); }
public void Handle(RemoveEmployeeEvent e) { this.EditDate = e.CreateDate; this.Editor = e.Creator; }