public IActionResult DeleteProductFromSupermarket(int supermarketId, int productId)
        {
            // check supermarket exists
            if (!_supermarketRepository.SupermarketExists(supermarketId))
            {
                return(NotFound());
            }

            // get targeted stock
            var productFromSupermarketFromRepo = _supermarketRepository.GetStockByProductAndSupermarket(supermarketId, productId);

            // check stock not null
            if (productFromSupermarketFromRepo == null)
            {
                return(NotFound());
            }

            // delete and save
            _supermarketRepository.DeleteSupermarketStock(productFromSupermarketFromRepo);

            if (!_supermarketRepository.Save())
            {
                throw new Exception($"Deleting product {productId} from supermarket {supermarketId} failed on save.");
            }

            return(NoContent());
        }