From 8ce85602142797ca78aed26c1cbd0c7a050c22a1 Mon Sep 17 00:00:00 2001 From: Robert Raboud Date: Thu, 1 Feb 2018 14:37:11 -0500 Subject: [PATCH] parse issue --- .../ProductPriceChangedIntegrationEventHandler.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs index 76a78bad7..fe15da624 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs @@ -30,9 +30,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Even private async Task UpdatePriceInBasketItems(int productId, decimal newPrice, decimal oldPrice, CustomerBasket basket) { - var itemsToUpdate = basket?.Items?.Where(x => int.Parse(x.ProductId) == productId).ToList(); + string match = productId.ToString(); + var itemsToUpdate = basket?.Items?.Where(x => x.ProductId == match).ToList(); - if (itemsToUpdate != null) + if (itemsToUpdate != null) { foreach (var item in itemsToUpdate) {