Beispiel #1
0
 private void OnAddressUpdated(FavoriteAddressUpdated @event)
 {
     if (!_favoriteAddresses.Contains(@event.Address.Id))
     {
         _favoriteAddresses.Add(@event.Address.Id);
     }
 }
Beispiel #2
0
 public void Handle(FavoriteAddressUpdated @event)
 {
     using (var context = _contextFactory.Invoke())
     {
         var address = context.Find <AddressDetails>(@event.Address.Id);
         if (address != null)
         {
             address.IsHistoric = false;
             Mapper.Map(@event.Address, address);
             context.SaveChanges();
         }
     }
 }