public void RemoveProductFromShoppingCart(string id, string productIdToDecrement)
{
lock (_lock)
{
var product = _productRepository.GetProducts().FirstOrDefault(c => c.ProductNumber == productIdToDecrement);
if (product == null)
{
throw new HttpResponseException(HttpStatusCode.NotFound);
}
if (!_shoppingCartRepository.RemoveProductFromCart(id, productIdToDecrement))
{
throw new HttpResponseException(HttpStatusCode.NotFound);
}
}
}