public void Handle(EmployeeRemovedFromLocationEvent message) { var location = _locationRepo.GetByID(message.OldLocationID); location.Employees.Remove(message.EmployeeID); _locationRepo.Save(location); }
public async Task Handle(EmployeeRemovedFromLocationEvent message) { var location = await _locationRepository.GetByID(message.OldLocationID); location.Employees.Remove(message.EmployeeID); await _locationRepository.Save(location); }
public Task Handle(EmployeeRemovedFromLocationEvent message) { var location = _locationRepository.GetByID(message._locationId); location.Employees.Remove(message.employeeId); _locationRepository.Save(location); return(Task.CompletedTask); }
private void Apply(EmployeeRemovedFromLocationEvent e) { _employees.Remove(e.EmployeeId); }