Browse Source

Minor updates in comments, so it is clearer.

pull/408/head
Cesar De la Torre 7 years ago
parent
commit
48af69ce18
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs

+ 2
- 2
src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs View File

@ -180,7 +180,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
catalogItem = productToUpdate;
_catalogContext.CatalogItems.Update(catalogItem);
if (raiseProductPriceChangedEvent) // Save and publish integration event if price has changed
if (raiseProductPriceChangedEvent) // Save product's data and publish integration event through the Event Bus if price has changed
{
//Create Integration Event to be published through the Event Bus
var priceChangedEvent = new ProductPriceChangedIntegrationEvent(catalogItem.Id, productToUpdate.Price, oldPrice);
@ -191,7 +191,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
// Publish through the Event Bus and mark the saved event as published
await _catalogIntegrationEventService.PublishThroughEventBusAsync(priceChangedEvent);
}
else // Save updated product
else // Just save the updated product because the Product's Price hasn't changed.
{
await _catalogContext.SaveChangesAsync();
}


Loading…
Cancel
Save