private bool IsProductCodeAndNameExists(string productName) { Product products = productGateway.GetProductCodeAndName(productName); if (products != null) { return(true); } else { return(false); } }