public void Process(ItemAddedToListing @event)
 {
     _logger.Information($"Item added to listing. Article '{@event.Article}' id '{@event.Id}'");
     try
     {
         _repositoryForProduct.Insert(new Product()
         {
             Id          = @event.Id,
             Article     = @event.Article,
             Price       = @event.Price,
             Category    = @event.Category,
             Description = @event.Description,
             Stock       = @event.Stock
         });
     }
     catch (Exception e)
     {
         _logger.Error(e, "Error while adding item to listing");
     }
 }
Exemplo n.º 2
0
 public void Process(ItemAddedToListing @event)
 {
     _logger.Information($"Item added to listing. Article '{@event.Article}'");
 }