From 48af69ce180e4437f8dd283424c401021fbb6a37 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Mon, 30 Oct 2017 18:12:28 -0700 Subject: [PATCH] Minor updates in comments, so it is clearer. --- .../Catalog/Catalog.API/Controllers/CatalogController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs index 1830fd90a..1b53171d0 100644 --- a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs +++ b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs @@ -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(); }