public JsonResult DeletePackageById(int packageId) { try { PackagesList package = _packageListService.DeletePackageById(packageId); _tripService.DeletePackageCost(package.TripId, package.Rate); return(Json(package.Rate, JsonRequestBehavior.AllowGet)); } catch (Exception e) { return(Json("Error", JsonRequestBehavior.AllowGet)); } }