diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs index 19ae1b594..90c1fc4ef 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs @@ -15,9 +15,9 @@ namespace Basket.API.IntegrationEvents.EventHandling _repository = repository ?? throw new ArgumentNullException(nameof(repository)); } - public async Task Handle(OrderStartedIntegrationEvent @event) + public Task Handle(OrderStartedIntegrationEvent @event) { - await _repository.DeleteBasketAsync(@event.UserId.ToString()); + return _repository.DeleteBasketAsync(@event.UserId); } } } diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs index 546483b40..102240a24 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs @@ -24,11 +24,11 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Even { var basket = await _repository.GetBasketAsync(id); - await UpdatePriceInBasketItems(@event.ProductId, @event.NewPrice, @event.OldPrice, basket); + await UpdatePriceInBasketItemsAsync(@event.ProductId, @event.NewPrice, @event.OldPrice, basket); } } - private async Task UpdatePriceInBasketItems(int productId, decimal newPrice, decimal oldPrice, CustomerBasket basket) + private async Task UpdatePriceInBasketItemsAsync(int productId, decimal newPrice, decimal oldPrice, CustomerBasket basket) { string match = productId.ToString(); var itemsToUpdate = basket?.Items?.Where(x => x.ProductId == match).ToList();