public IHttpActionResult GetProduct(int ProductID) { Product P = BLProduct.GetProduct(ProductID); if (P != null) { return(Ok(P)); } else //Supplierid not found { return(NotFound()); } }