public bool IsCodeIsExist(string code) { bool isCodeExist = false; Product aProduct = productGateway.GetProductByCode(code); if (aProduct.Code != null) { isCodeExist = true; } return(isCodeExist); }