public void Handle(EmployeeRemovedFromLocationEvent message)
        {
            var location = _locationRepo.GetByID(message.OldLocationID);

            location.Employees.Remove(message.EmployeeID);
            _locationRepo.Save(location);
        }
示例#2
0
        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);
        }
示例#4
0
 private void Apply(EmployeeRemovedFromLocationEvent e)
 {
     _employees.Remove(e.EmployeeId);
 }