public IHttpActionResult GetProduct(int id) { var product = repository.Get(id); if (product == null) { return(NotFound()); } return(Ok(product)); }