예제 #1
0
 private void Apply(RemoveProductAvailabilityNotification @event)
 {
     if (_items.Contains(@event.Email))
     {
         _items.Remove(@event.Email);
     }
 }
예제 #2
0
        public void Handle(RemoveProductAvailabilityNotification message)
        {
            var favorites = _repository.GetById(message.ProductId.ToGuid());
            var version   = favorites.Version;

            favorites.RemoveNotification(message.ProductId.ToGuid(), message.Email);
            _repository.Save(favorites, version);
        }