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