public IHttpActionResult Get(int id) { try { var PO = svr.Get(id); if (PO != null) { return(Ok(PO)); } else { return(BadRequest("Submission Not Found")); } } catch (Exception ex) { HttpResponseMessage httpResponseMessage = new HttpResponseMessage(HttpStatusCode.BadRequest); httpResponseMessage.Content = new StringContent(ex.Message); throw new HttpResponseException(httpResponseMessage); } }