public IHttpActionResult GetItemByItemid(int itemid) { string error = ""; ItemModel im = ItemRepo.GetItemByItemid(itemid, out error); if (error != "" || im == null) { if (error == ConError.Status.NOTFOUND) { return(Content(HttpStatusCode.NotFound, "Item Not Found")); } return(Content(HttpStatusCode.BadRequest, error)); } return(Ok(im)); }