public HttpResponseMessage GetRoot(int UserId, int RootId) { try { using (CarSystemEntities db = new CarSystemEntities()) { var returnData = db.prGetRoots(UserId, RootId, "Single").ToList(); return(Request.CreateResponse(HttpStatusCode.OK, returnData)); } } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, "System has failed to show root details. Please contact with admin.")); } }