public async Task RemoveBasketItem(int id) { var item = await _queries.GetBasketItem(id); if (item == null) { throw new ModelNotFoundException("Basket item not found."); } var basket = await _queries.GetBasketWithItem(id); _unitOfWork.Delete(item); await _unitOfWork.PersistChanges(); _basketCache.Invalidate(basket.Id); }