public HttpResponseMessage DeleteVendor(int VendorId, int UserId) { try { using (CarSystemEntities db = new CarSystemEntities()) { var returnData = db.prDeleteVendor(VendorId, UserId).FirstOrDefault(); return(Request.CreateResponse(HttpStatusCode.OK, returnData.ToString())); } } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, "System has failed to delete bus information. Please try agian.")); } }