public IActionResult RemoveTransaction() { if (_lastTransaction.TransactionType == TransactionType.Bought) { _productRepository.RemoveOrUpdateProducts(ProductWrapper.products(_lastTransaction.ProductHistory)); } else { _productRepository.AddProducts(ProductWrapper.products(_lastTransaction.ProductHistory)); } _lastTransaction = _transactionRepository.RemoveLastTransaction(); return(Ok()); }