public (decimal ProductPrice, bool TerminalFound, int ProductId) ValidateTerminal(string deviceUid) { decimal productPrice; bool productFound; int productId; //Get product price from database try { var result = _getProductPrice.GetProductPriceFromTerminal(deviceUid); productPrice = result.ProductPrice; productId = result.ProductId; productFound = result.ValidTerminal; } catch (System.Data.SqlClient.SqlException error) { //Log error with app insights _logger.LogError("While running this error showed up:", error); return(0, false, 0); } return(productPrice, productFound, productId); }